import math
 
def prime(num):
  if num==1 or num==2 or num==3:
    return True
  for i in range(2,int(math.sqrt(num))+1):
    if num%i==0:
      return False
  else:
    return True
 
n=int(input())
ans=0
for i in range(n):
  tmp=int(input())
  if prime(tmp):
    ans+=1
print(ans) import math math def prime(num):
  if num==1 or num==2 or num==3:
    return True
  for i in range(2,int(math.sqrt(num))+1):
    if num%i==0:
      return False
  else:
    return True
  prime if num==1 or num==2 or num==3:
    return True
   num==1 or num==2 or num==3 num==1 or num==2 num==1 num 1 num==2 num 2 num==3 num 3 return True True for i in range(2,int(math.sqrt(num))+1):
    if num%i==0:
      return False
  else:
    return True
  i range(2,int(math.sqrt(num))+1) range 2 int(math.sqrt(num))+1 int(math.sqrt(num)) int math.sqrt(num) math.sqrt math sqrt num 1 if num%i==0:
      return False
   num%i==0 num%i num i 0 return False False return True True num num n=int(input()) n int(input()) int input() input ans=0 ans 0 for i in range(n):
  tmp=int(input())
  if prime(tmp):
    ans+=1 i range(n) range n tmp=int(input()) tmp int(input()) int input() input if prime(tmp):
    ans+=1 prime(tmp) prime tmp ans+=1 ans 1 print(ans) print ans tmp=int(input()) int(input()) tmp def prime(num):
  if num==1 or num==2 or num==3:
    return True
  for i in range(2,int(math.sqrt(num))+1):
    if num%i==0:
      return False
  else:
    return True
  def prime(num):
  if num==1 or num==2 or num==3:
    return True
  for i in range(2,int(math.sqrt(num))+1):
    if num%i==0:
      return False
  else:
    return True
  prime ans+=1 1 ans ans=0 0 ans n=int(input()) int(input()) n
import math
 
def prime(num):
  if num==1 or num==2 or num==3:
    return True
  for i in range(2,int(math.sqrt(num))+1):
    if num%i==0:
      return False
  else:
    return True
 
n=int(input())
ans=0
for i in range(n):
  tmp=int(input())
  if prime(tmp):
    ans+=1
print(ans)
