import math
def isprime(x):
 if x == 2:
  return True
 elif x < 2 or x % 2 == 0:
  return False
 else:
  for i in range(3, int(math.sqrt(x)) + 1,2):
   if x % i == 0:
    return False 
  return True

n = int(input())
cnt = 0
for i in range(n):
 x = int(input())
 if isprime(x):
  cnt += 1
print(str(cnt)) import math math def isprime(x):
 if x == 2:
  return True
 elif x < 2 or x % 2 == 0:
  return False
 else:
  for i in range(3, int(math.sqrt(x)) + 1,2):
   if x % i == 0:
    return False 
  return True isprime if x == 2:
  return True
 elif x < 2 or x % 2 == 0:
  return False
 else:
  for i in range(3, int(math.sqrt(x)) + 1,2):
   if x % i == 0:
    return False 
  return True x == 2 x 2 return True True elif 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 for i in range(3, int(math.sqrt(x)) + 1,2):
   if x % i == 0:
    return False 
   i range(3, int(math.sqrt(x)) + 1,2) range 3 int(math.sqrt(x)) + 1 int(math.sqrt(x)) int math.sqrt(x) math.sqrt math sqrt x 1 2 if x % i == 0:
    return False 
   x % i == 0 x % i x i 0 return False False return True True x x n = int(input()) n int(input()) int input() input cnt = 0 cnt 0 for i in range(n):
 x = int(input())
 if isprime(x):
  cnt += 1 i range(n) range n x = int(input()) x int(input()) int input() input if isprime(x):
  cnt += 1 isprime(x) isprime x cnt += 1 cnt 1 print(str(cnt)) print str(cnt) str cnt x = int(input()) int(input()) x n = int(input()) int(input()) n cnt += 1 1 cnt def isprime(x):
 if x == 2:
  return True
 elif x < 2 or x % 2 == 0:
  return False
 else:
  for i in range(3, int(math.sqrt(x)) + 1,2):
   if x % i == 0:
    return False 
  return True def isprime(x):
 if x == 2:
  return True
 elif x < 2 or x % 2 == 0:
  return False
 else:
  for i in range(3, int(math.sqrt(x)) + 1,2):
   if x % i == 0:
    return False 
  return True isprime cnt = 0 0 cnt
import math
def isprime(x):
 if x == 2:
  return True
 elif x < 2 or x % 2 == 0:
  return False
 else:
  for i in range(3, int(math.sqrt(x)) + 1,2):
   if x % i == 0:
    return False 
  return True

n = int(input())
cnt = 0
for i in range(n):
 x = int(input())
 if isprime(x):
  cnt += 1
print(str(cnt))