from sys import stdin
def isPrime(x):
    if x == 2: return 1
    elif x % 2 == 0: return 0
    return pow(2, x - 1, x) == 1
print(len([0 for _ in range(int(stdin.readline())) if isPrime(int(stdin.readline())) == 1])) from sys import stdin def isPrime(x):
    if x == 2: return 1
    elif x % 2 == 0: return 0
    return pow(2, x - 1, x) == 1 isPrime if x == 2: return 1
    elif x % 2 == 0: return 0
     x == 2 x 2 elif x % 2 == 0: return 0
     x % 2 == 0 x % 2 x 2 0 return pow(2, x - 1, x) == 1 pow(2, x - 1, x) == 1 pow(2, x - 1, x) pow 2 x - 1 x 1 x 1 x x 0 for _ in range(int(stdin.readline())) if isPrime(int(stdin.readline())) == 1 for _ in range(int(stdin.readline())) if isPrime(int(stdin.readline())) == 1 _ range(int(stdin.readline())) range int(stdin.readline()) int stdin.readline() stdin.readline stdin readline isPrime(int(stdin.readline())) == 1 isPrime(int(stdin.readline())) isPrime int(stdin.readline()) int stdin.readline() stdin.readline stdin readline 1 if isPrime(int(stdin.readline())) == 1 0 print(len([0 for _ in range(int(stdin.readline())) if isPrime(int(stdin.readline())) == 1])) print len([0 for _ in range(int(stdin.readline())) if isPrime(int(stdin.readline())) == 1]) len [0 for _ in range(int(stdin.readline())) if isPrime(int(stdin.readline())) == 1] def isPrime(x):
    if x == 2: return 1
    elif x % 2 == 0: return 0
    return pow(2, x - 1, x) == 1 def isPrime(x):
    if x == 2: return 1
    elif x % 2 == 0: return 0
    return pow(2, x - 1, x) == 1 isPrime
from sys import stdin
def isPrime(x):
    if x == 2: return 1
    elif x % 2 == 0: return 0
    return pow(2, x - 1, x) == 1
print(len([0 for _ in range(int(stdin.readline())) if isPrime(int(stdin.readline())) == 1]))