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