def is_prime(p):
    for i in range(2, int(p**(1/2))+ 1):
        if p % i == 0:
            return False
    
    return True


n = int(input())
count = 0
for _ in range(n):
    p = int(input())
    if is_prime(p):
        count += 1

print(count)


