def prime(x):
    for _ in range(2, int(x**(1/2)+1)):
        if x % _ == 0:
            return False
    return True

n = int(input())
anw = 0
for _ in range(n):
    if prime(int(input())):
        anw += 1
print(anw)
