import math
n = int(input())
count = 0
for i in range(n):
    a = int(input())
    h = math.trunc(math.sqrt(a))+1
    b = 0
    if a == 1:
        b = 1
    if a == 2:
        b = 0
    elif a % 2 == 0:
        b = 1
    else:
        i = 3
        while i <= h:
            if a % i == 0:
                b = 1
            i += 2
    if b == 0:
        count += 1
print count import math math n = int(input()) n int(input()) int input() input count = 0 count 0 for i in range(n):
    a = int(input())
    h = math.trunc(math.sqrt(a))+1
    b = 0
    if a == 1:
        b = 1
    if a == 2:
        b = 0
    elif a % 2 == 0:
        b = 1
    else:
        i = 3
        while i <= h:
            if a % i == 0:
                b = 1
            i += 2
    if b == 0:
        count += 1 i range(n) range n a = int(input()) a int(input()) int input() input h = math.trunc(math.sqrt(a))+1 h math.trunc(math.sqrt(a))+1 math.trunc(math.sqrt(a)) math.trunc math trunc math.sqrt(a) math.sqrt math sqrt a 1 b = 0 b 0 if a == 1:
        b = 1
     a == 1 a 1 b = 1 b 1 if a == 2:
        b = 0
    elif a % 2 == 0:
        b = 1
    else:
        i = 3
        while i <= h:
            if a % i == 0:
                b = 1
            i += 2
     a == 2 a 2 b = 0 b 0 elif a % 2 == 0:
        b = 1
     a % 2 == 0 a % 2 a 2 0 b = 1 b 1 i = 3 i 3 while i <= h:
            if a % i == 0:
                b = 1
            i += 2
     i <= h i h if a % i == 0:
                b = 1
             a % i == 0 a % i a i 0 b = 1 b 1 i += 2 i 2 if b == 0:
        count += 1 b == 0 b 0 count += 1 count 1 print n = int(input()) int(input()) n i = 3 3 i b = 1 1 b count = 0 0 count a = int(input()) int(input()) a b = 1 1 b b = 1 1 b b = 0 0 b i += 2 2 i h = math.trunc(math.sqrt(a))+1 math.trunc(math.sqrt(a))+1 h count += 1 1 count b = 0 0 b
import math
n = int(input())
count = 0
for i in range(n):
    a = int(input())
    h = math.trunc(math.sqrt(a))+1
    b = 0
    if a == 1:
        b = 1
    if a == 2:
        b = 0
    elif a % 2 == 0:
        b = 1
    else:
        i = 3
        while i <= h:
            if a % i == 0:
                b = 1
            i += 2
    if b == 0:
        count += 1
print count