import math
def is_prime(a):
    for i in range(2,int(math.sqrt(a))+1):
        if a%i==0:
            return False
    return True

n = int(input())
cnt = 0
for i in range(n):
    x = int(input())
    if is_prime(x):
        cnt+=1
print(cnt)
