def f(i):
    if i == 2:return 1
    return pow(2, i-1, i) == 1
print(sum(1 for n in range(int(input())) if f(int(input())))) def f(i):
    if i == 2:return 1
    return pow(2, i-1, i) == 1 f if i == 2:return 1
     i == 2 i 2 return pow(2, i-1, i) == 1 pow(2, i-1, i) == 1 pow(2, i-1, i) pow 2 i-1 i 1 i 1 i i print(sum(1 for n in range(int(input())) if f(int(input())))) print sum(1 for n in range(int(input())) if f(int(input()))) sum 1 def f(i):
    if i == 2:return 1
    return pow(2, i-1, i) == 1 def f(i):
    if i == 2:return 1
    return pow(2, i-1, i) == 1 f
def f(i):
    if i == 2:return 1
    return pow(2, i-1, i) == 1
print(sum(1 for n in range(int(input())) if f(int(input()))))