n = int(input())
ans = 0
for i in range(n):
    yakusuu = 0
    k = int(input())
    for j in range(1, k+1):
        if k % j == 0:
            yakusuu += 1
        if yakusuu > 2:
            break
    if yakusuu == 2:
        ans += 1
print(ans)