def isPrime(n):
    p = 2
    while p * p <= val:
        if val % p == 0 :
            return False
    
        p +=1
    return True    
t = int(input())
cnt = 0
for i in range(t):
    val = int(input())
    if isPrime(val):
        cnt +=1

print(cnt)
