n = int(input())
c = 0
for i in range(n):
    x = int(input())
    counter = 0
    for j in range(x):
        if x % (j+1) == 0:
            counter = counter + 1
    if counter == 2:
        c = c + 1

print(c)