n = int(input())

count = 0

for i in range(n):
  check = True
  
  key = int(input())

  for i in range(2,key):
    if key % i == 0:
      check = False
    
  if check:
    count += 1

print(count)
