import sys,math

def is_prime_number(arg):
    arg_sqrt=int(math.floor(math.sqrt(arg)))
    i=2
    while i <=arg_sqrt:
        if arg %i ==0:
            return False
        i+=1

    return True
        
        
n=0
prime_numbers=0
for line in sys.stdin:
    l=int(line)
    if n == 0:
        n=l
        continue

    if is_prime_number(l):
        prime_numbers+=1
        

print prime_numbers import sys,math sys math def is_prime_number(arg):
    arg_sqrt=int(math.floor(math.sqrt(arg)))
    i=2
    while i <=arg_sqrt:
        if arg %i ==0:
            return False
        i+=1

    return True
        
         is_prime_number arg_sqrt=int(math.floor(math.sqrt(arg))) arg_sqrt int(math.floor(math.sqrt(arg))) int math.floor(math.sqrt(arg)) math.floor math floor math.sqrt(arg) math.sqrt math sqrt arg i=2 i 2 while i <=arg_sqrt:
        if arg %i ==0:
            return False
        i+=1

     i <=arg_sqrt i arg_sqrt if arg %i ==0:
            return False
         arg %i ==0 arg %i arg i 0 return False False i+=1 i 1 return True True arg arg n=0 n 0 prime_numbers=0 prime_numbers 0 for line in sys.stdin:
    l=int(line)
    if n == 0:
        n=l
        continue

    if is_prime_number(l):
        prime_numbers+=1
         line sys.stdin sys stdin l=int(line) l int(line) int line if n == 0:
        n=l
        continue

     n == 0 n 0 n=l n l continue if is_prime_number(l):
        prime_numbers+=1
         is_prime_number(l) is_prime_number l prime_numbers+=1 prime_numbers 1 print n=0 0 n def is_prime_number(arg):
    arg_sqrt=int(math.floor(math.sqrt(arg)))
    i=2
    while i <=arg_sqrt:
        if arg %i ==0:
            return False
        i+=1

    return True
        
         def is_prime_number(arg):
    arg_sqrt=int(math.floor(math.sqrt(arg)))
    i=2
    while i <=arg_sqrt:
        if arg %i ==0:
            return False
        i+=1

    return True
        
         is_prime_number l=int(line) int(line) l prime_numbers+=1 1 prime_numbers prime_numbers=0 0 prime_numbers n=l l n
import sys,math

def is_prime_number(arg):
    arg_sqrt=int(math.floor(math.sqrt(arg)))
    i=2
    while i <=arg_sqrt:
        if arg %i ==0:
            return False
        i+=1

    return True
        
        
n=0
prime_numbers=0
for line in sys.stdin:
    l=int(line)
    if n == 0:
        n=l
        continue

    if is_prime_number(l):
        prime_numbers+=1
        

print prime_numbers