#! -*- coding:utf-8 -*-
# ?´???°??????
# ???????????§????????°??????????????????????¢????????´???°?????????????????????????????§????????????
def is_prime(num):
    if num==2 or num==3:
        return True
    for x in xrange(2,int(num**0.5)+1):
        if num%x ==0:
            return False
    return True

count = 0
for i in xrange(input()):
    input_prime_candidate = input()
    if is_prime(input_prime_candidate):
        count+=1
print count def is_prime(num):
    if num==2 or num==3:
        return True
    for x in xrange(2,int(num**0.5)+1):
        if num%x ==0:
            return False
    return True is_prime if num==2 or num==3:
        return True
     num==2 or num==3 num==2 num 2 num==3 num 3 return True True for x in xrange(2,int(num**0.5)+1):
        if num%x ==0:
            return False
     x xrange(2,int(num**0.5)+1) xrange 2 int(num**0.5)+1 int(num**0.5) int num**0.5 num 0.5 1 if num%x ==0:
            return False
     num%x ==0 num%x num x 0 return False False return True True num num count = 0 count 0 for i in xrange(input()):
    input_prime_candidate = input()
    if is_prime(input_prime_candidate):
        count+=1 i xrange(input()) xrange input() input input_prime_candidate = input() input_prime_candidate input() input if is_prime(input_prime_candidate):
        count+=1 is_prime(input_prime_candidate) is_prime input_prime_candidate count+=1 count 1 print count = 0 0 count count+=1 1 count input_prime_candidate = input() input() input_prime_candidate def is_prime(num):
    if num==2 or num==3:
        return True
    for x in xrange(2,int(num**0.5)+1):
        if num%x ==0:
            return False
    return True def is_prime(num):
    if num==2 or num==3:
        return True
    for x in xrange(2,int(num**0.5)+1):
        if num%x ==0:
            return False
    return True is_prime
#! -*- coding:utf-8 -*-
# ?´???°??????
# ???????????§????????°??????????????????????¢????????´???°?????????????????????????????§????????????
def is_prime(num):
    if num==2 or num==3:
        return True
    for x in xrange(2,int(num**0.5)+1):
        if num%x ==0:
            return False
    return True

count = 0
for i in xrange(input()):
    input_prime_candidate = input()
    if is_prime(input_prime_candidate):
        count+=1
print count