ans = 0
N = int(input())
for i in range(N):
    a = int(input())
    if a == 2:
        ans += 1
    elif a%2 == 0:
        continue
    else:
        if pow(2, a-1, a) == 1:
            ans += 1

print(ans) ans = 0 ans 0 N = int(input()) N int(input()) int input() input for i in range(N):
    a = int(input())
    if a == 2:
        ans += 1
    elif a%2 == 0:
        continue
    else:
        if pow(2, a-1, a) == 1:
            ans += 1 i range(N) range N a = int(input()) a int(input()) int input() input if a == 2:
        ans += 1
    elif a%2 == 0:
        continue
    else:
        if pow(2, a-1, a) == 1:
            ans += 1 a == 2 a 2 ans += 1 ans 1 elif a%2 == 0:
        continue
     a%2 == 0 a%2 a 2 0 continue if pow(2, a-1, a) == 1:
            ans += 1 pow(2, a-1, a) == 1 pow(2, a-1, a) pow 2 a-1 a 1 a 1 ans += 1 ans 1 print(ans) print ans ans = 0 0 ans N = int(input()) int(input()) N ans += 1 1 ans ans += 1 1 ans a = int(input()) int(input()) a
ans = 0
N = int(input())
for i in range(N):
    a = int(input())
    if a == 2:
        ans += 1
    elif a%2 == 0:
        continue
    else:
        if pow(2, a-1, a) == 1:
            ans += 1

print(ans)