def p(x):
 for i in[2,3,5,7,9,11,13,17,19,21,23]:
  if x%i==0:return [1,0][x>i]
 i=29
 while i<=x**.5:
  if x%i==0:return 0
  i+=2
 return 1
n=int(input())
print(sum([p(int(input()))for _ in range(n)])) def p(x):
 for i in[2,3,5,7,9,11,13,17,19,21,23]:
  if x%i==0:return [1,0][x>i]
 i=29
 while i<=x**.5:
  if x%i==0:return 0
  i+=2
 return 1 p for i in[2,3,5,7,9,11,13,17,19,21,23]:
  if x%i==0:return [1,0][x>i]
  i [2,3,5,7,9,11,13,17,19,21,23] 2 3 5 7 9 11 13 17 19 21 23 if x%i==0:return [1,0][x>i]
  x%i==0 x%i x i 0 i=29 i 29 while i<=x**.5:
  if x%i==0:return 0
  i+=2
  i<=x**.5 i x**.5 x .5 if x%i==0:return 0
   x%i==0 x%i x i 0 i+=2 i 2 return 1 1 x x n=int(input()) n int(input()) int input() input p(int(input()))for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) p(int(input())) p int(input()) int input() input print(sum([p(int(input()))for _ in range(n)])) print sum([p(int(input()))for _ in range(n)]) sum [p(int(input()))for _ in range(n)] n=int(input()) int(input()) n def p(x):
 for i in[2,3,5,7,9,11,13,17,19,21,23]:
  if x%i==0:return [1,0][x>i]
 i=29
 while i<=x**.5:
  if x%i==0:return 0
  i+=2
 return 1 def p(x):
 for i in[2,3,5,7,9,11,13,17,19,21,23]:
  if x%i==0:return [1,0][x>i]
 i=29
 while i<=x**.5:
  if x%i==0:return 0
  i+=2
 return 1 p
def p(x):
 for i in[2,3,5,7,9,11,13,17,19,21,23]:
  if x%i==0:return [1,0][x>i]
 i=29
 while i<=x**.5:
  if x%i==0:return 0
  i+=2
 return 1
n=int(input())
print(sum([p(int(input()))for _ in range(n)]))