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
n = int(stdin.readline())
print(sum([isPrime(int(stdin.readline())) for _ in range(n)])) 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 n = int(stdin.readline()) n int(stdin.readline()) int stdin.readline() stdin.readline stdin readline isPrime(int(stdin.readline())) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) isPrime(int(stdin.readline())) isPrime int(stdin.readline()) int stdin.readline() stdin.readline stdin readline print(sum([isPrime(int(stdin.readline())) for _ in range(n)])) print sum([isPrime(int(stdin.readline())) for _ in range(n)]) sum [isPrime(int(stdin.readline())) for _ in range(n)] 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 n = int(stdin.readline()) int(stdin.readline()) n
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
n = int(stdin.readline())
print(sum([isPrime(int(stdin.readline())) for _ in range(n)]))