def divisor(num):
    for i in range(2, num):
        if num % i == 0:
            return False

    return True



N = int(input())
cnt = 0
for itr in range(N):
    num = int(input())
    if divisor(num):
        cnt = cnt + 1

print(cnt)
