n = int(input())
sum = 0
for _ in range(n):
    a = int(input())
    if a == 2:
        continue
    for i in range(a):
        x = i + 2
        if a%x == 0:
            sum += 1
            break
        if x > a ** 0.5:
            break
print(n - sum)
 n = int(input()) n int(input()) int input() input sum = 0 sum 0 for _ in range(n):
    a = int(input())
    if a == 2:
        continue
    for i in range(a):
        x = i + 2
        if a%x == 0:
            sum += 1
            break
        if x > a ** 0.5:
            break _ range(n) range n a = int(input()) a int(input()) int input() input if a == 2:
        continue
     a == 2 a 2 continue for i in range(a):
        x = i + 2
        if a%x == 0:
            sum += 1
            break
        if x > a ** 0.5:
            break i range(a) range a x = i + 2 x i + 2 i 2 if a%x == 0:
            sum += 1
            break
         a%x == 0 a%x a x 0 sum += 1 sum 1 break if x > a ** 0.5:
            break x > a ** 0.5 x a ** 0.5 a 0.5 break print(n - sum) print n - sum n sum sum = 0 0 sum a = int(input()) int(input()) a x = i + 2 i + 2 x n = int(input()) int(input()) n sum += 1 1 sum
n = int(input())
sum = 0
for _ in range(n):
    a = int(input())
    if a == 2:
        continue
    for i in range(a):
        x = i + 2
        if a%x == 0:
            sum += 1
            break
        if x > a ** 0.5:
            break
print(n - sum)

