from math import sqrt
N = input()
sum = 0
for _ in xrange(N):
    n = input()
    for i in xrange(2,int(sqrt(n))+1):
        if n%i == 0:
            break
    else:
        sum += 1
print sum from math import sqrt N = input() N input() input sum = 0 sum 0 for _ in xrange(N):
    n = input()
    for i in xrange(2,int(sqrt(n))+1):
        if n%i == 0:
            break
    else:
        sum += 1 _ xrange(N) xrange N n = input() n input() input for i in xrange(2,int(sqrt(n))+1):
        if n%i == 0:
            break
    else:
        sum += 1 i xrange(2,int(sqrt(n))+1) xrange 2 int(sqrt(n))+1 int(sqrt(n)) int sqrt(n) sqrt n 1 if n%i == 0:
            break
     n%i == 0 n%i n i 0 break sum += 1 sum 1 print sum = 0 0 sum n = input() input() n N = input() input() N sum += 1 1 sum
from math import sqrt
N = input()
sum = 0
for _ in xrange(N):
    n = input()
    for i in xrange(2,int(sqrt(n))+1):
        if n%i == 0:
            break
    else:
        sum += 1
print sum