def isPrime(x):
    for i in range(2,int(x**0.5)+1):
        if x%i==0:
            return False
    return True

n=int(input())
ans=0
for i in range(n):
    if isPrime(int(input())):
        ans+=1
print(ans)
