def isPrime(num):
    if num == 2: return 1
    if num < 2 or num&1 == 0: return 0
    if pow(2, num-1, num) == 1: return 1
    return 0

n = input()
s = 0
for i in xrange(n):
    s += isPrime(input())

print s def isPrime(num):
    if num == 2: return 1
    if num < 2 or num&1 == 0: return 0
    if pow(2, num-1, num) == 1: return 1
    return 0 isPrime if num == 2: return 1
     num == 2 num 2 if num < 2 or num&1 == 0: return 0
     num < 2 or num&1 == 0 num < 2 num 2 num&1 == 0 num&1 num 1 0 if pow(2, num-1, num) == 1: return 1
     pow(2, num-1, num) == 1 pow(2, num-1, num) pow 2 num-1 num 1 num 1 return 0 0 num num n = input() n input() input s = 0 s 0 for i in xrange(n):
    s += isPrime(input()) i xrange(n) xrange n s += isPrime(input()) s isPrime(input()) isPrime input() input print s = 0 0 s n = input() input() n def isPrime(num):
    if num == 2: return 1
    if num < 2 or num&1 == 0: return 0
    if pow(2, num-1, num) == 1: return 1
    return 0 def isPrime(num):
    if num == 2: return 1
    if num < 2 or num&1 == 0: return 0
    if pow(2, num-1, num) == 1: return 1
    return 0 isPrime s += isPrime(input()) isPrime(input()) s
def isPrime(num):
    if num == 2: return 1
    if num < 2 or num&1 == 0: return 0
    if pow(2, num-1, num) == 1: return 1
    return 0

n = input()
s = 0
for i in xrange(n):
    s += isPrime(input())

print s