def is_prime(n):
  if n == 2: return True
  if n < 2 or n % 2 == 0: return False
  return pow(2, n - 1, n) == 1

count = 0
for i in range(int(input())):
  if is_prime(int(input())) : count += 1
print(count) def is_prime(n):
  if n == 2: return True
  if n < 2 or n % 2 == 0: return False
  return pow(2, n - 1, n) == 1 is_prime if n == 2: return True
   n == 2 n 2 if n < 2 or n % 2 == 0: return False
   n < 2 or n % 2 == 0 n < 2 n 2 n % 2 == 0 n % 2 n 2 0 return pow(2, n - 1, n) == 1 pow(2, n - 1, n) == 1 pow(2, n - 1, n) pow 2 n - 1 n 1 n 1 n n count = 0 count 0 for i in range(int(input())):
  if is_prime(int(input())) : count += 1 i range(int(input())) range int(input()) int input() input if is_prime(int(input())) : count += is_prime(int(input())) is_prime int(input()) int input() input print(count) print count count = 0 0 count def is_prime(n):
  if n == 2: return True
  if n < 2 or n % 2 == 0: return False
  return pow(2, n - 1, n) == 1 def is_prime(n):
  if n == 2: return True
  if n < 2 or n % 2 == 0: return False
  return pow(2, n - 1, n) == 1 is_prime
def is_prime(n):
  if n == 2: return True
  if n < 2 or n % 2 == 0: return False
  return pow(2, n - 1, n) == 1

count = 0
for i in range(int(input())):
  if is_prime(int(input())) : count += 1
print(count)