import math
def isprime(x):
  if x == 2:
    return True

  if x < 2 or x % 2 == 0:
    return False

  i = 3
  while i <= math.sqrt(x):
    if x % i == 0:
      return False
    i = i + 2

  return True


count = 0
n = int(input())
for i in range(0, n):
  if isprime(int(input())):
    count += 1

print(count) import math math def isprime(x):
  if x == 2:
    return True

  if x < 2 or x % 2 == 0:
    return False

  i = 3
  while i <= math.sqrt(x):
    if x % i == 0:
      return False
    i = i + 2

  return True isprime if x == 2:
    return True

   x == 2 x 2 return True True if x < 2 or x % 2 == 0:
    return False

   x < 2 or x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return False False i = 3 i 3 while i <= math.sqrt(x):
    if x % i == 0:
      return False
    i = i + 2

   i <= math.sqrt(x) i math.sqrt(x) math.sqrt math sqrt x if x % i == 0:
      return False
     x % i == 0 x % i x i 0 return False False i = i + 2 i i + 2 i 2 return True True x x count = 0 count 0 n = int(input()) n int(input()) int input() input for i in range(0, n):
  if isprime(int(input())):
    count += 1 i range(0, n) range 0 n if isprime(int(input())):
    count += 1 isprime(int(input())) isprime int(input()) int input() input count += 1 count 1 print(count) print count count += 1 1 count count = 0 0 count def isprime(x):
  if x == 2:
    return True

  if x < 2 or x % 2 == 0:
    return False

  i = 3
  while i <= math.sqrt(x):
    if x % i == 0:
      return False
    i = i + 2

  return True def isprime(x):
  if x == 2:
    return True

  if x < 2 or x % 2 == 0:
    return False

  i = 3
  while i <= math.sqrt(x):
    if x % i == 0:
      return False
    i = i + 2

  return True isprime n = int(input()) int(input()) n
import math
def isprime(x):
  if x == 2:
    return True

  if x < 2 or x % 2 == 0:
    return False

  i = 3
  while i <= math.sqrt(x):
    if x % i == 0:
      return False
    i = i + 2

  return True


count = 0
n = int(input())
for i in range(0, n):
  if isprime(int(input())):
    count += 1

print(count)