import math


def isprime(x):
    for i in range(2,int(math.sqrt(x)) + 1):
        if x % i == 0:
            return 0
    return 1


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