import sys
import math

def isPrime(x):
     if x <= 1:
          return False
     if x == 2:
          return True
     root_x = int(math.sqrt(x)) + 1
     for num in range(2, root_x):
          if x%(num) == 0:
               return False
     return True

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

print count import sys sys import math math def isPrime(x):
     if x <= 1:
          return False
     if x == 2:
          return True
     root_x = int(math.sqrt(x)) + 1
     for num in range(2, root_x):
          if x%(num) == 0:
               return False
     return True isPrime if x <= 1:
          return False
      x <= 1 x 1 return False False if x == 2:
          return True
      x == 2 x 2 return True True root_x = int(math.sqrt(x)) + 1 root_x int(math.sqrt(x)) + 1 int(math.sqrt(x)) int math.sqrt(x) math.sqrt math sqrt x 1 for num in range(2, root_x):
          if x%(num) == 0:
               return False
      num range(2, root_x) range 2 root_x if x%(num) == 0:
               return False
      x%(num) == 0 x%(num) x num 0 return False False return True True x x input = [] input [] for line in sys.stdin:
     input.append(int(line))
##input = [2, 4, 7, 1, 2, 3, 1, 11, 4576435353, 2342342] line sys.stdin sys stdin input.append(int(line)) input.append input append int(line) int line count = 0 count 0 for num in set(input):
     if isPrime(num):
          count += 1 num set(input) set input if isPrime(num):
          count += 1 isPrime(num) isPrime num count += 1 count 1 print count += 1 1 count count = 0 0 count def isPrime(x):
     if x <= 1:
          return False
     if x == 2:
          return True
     root_x = int(math.sqrt(x)) + 1
     for num in range(2, root_x):
          if x%(num) == 0:
               return False
     return True def isPrime(x):
     if x <= 1:
          return False
     if x == 2:
          return True
     root_x = int(math.sqrt(x)) + 1
     for num in range(2, root_x):
          if x%(num) == 0:
               return False
     return True isPrime input = [] [] input
import sys
import math

def isPrime(x):
     if x <= 1:
          return False
     if x == 2:
          return True
     root_x = int(math.sqrt(x)) + 1
     for num in range(2, root_x):
          if x%(num) == 0:
               return False
     return True

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

print count