def isPrime(number):
    for i in range(2,number):
        if number%(i)==0:
            return False
    return True
N=int(input())
numbers=[]
for i in range(N):
    numbers.append(int(input()))
    pass
count=0
for number in numbers:
    if isPrime(number):
        count+=1
print(count)