import sys

def isPrime(x):
     if x == 1:
          return False
     if x == 2:
          return True
     for num in range(x - 2):
          if x%(num+2) == 0:
               return False
     return True

input = []
for line in sys.stdin:
     input.append(int(line))
##input = [2, 4, 7, 1, 2, 3, 1, 11]
count = 0
for num in set(input):
     if isPrime(num):
          count += 1

print count