import math

ans = 0
N = int(input())
for i in range(N):
    a = int(input())
    if a != 2 and a%2 == 0:
        continue
    b = True
    for j in range(3, int(math.sqrt(a))+1, 2):
        if a%j == 0:
            b = False
    if b:
        ans += 1

print(ans) import math math ans = 0 ans 0 N = int(input()) N int(input()) int input() input for i in range(N):
    a = int(input())
    if a != 2 and a%2 == 0:
        continue
    b = True
    for j in range(3, int(math.sqrt(a))+1, 2):
        if a%j == 0:
            b = False
    if b:
        ans += 1 i range(N) range N a = int(input()) a int(input()) int input() input if a != 2 and a%2 == 0:
        continue
     a != 2 and a%2 == 0 a != 2 a 2 a%2 == 0 a%2 a 2 0 continue b = True b True for j in range(3, int(math.sqrt(a))+1, 2):
        if a%j == 0:
            b = False
     j range(3, int(math.sqrt(a))+1, 2) range 3 int(math.sqrt(a))+1 int(math.sqrt(a)) int math.sqrt(a) math.sqrt math sqrt a 1 2 if a%j == 0:
            b = False
     a%j == 0 a%j a j 0 b = False b False if b:
        ans += 1 b ans += 1 ans 1 print(ans) print ans b = True True b ans += 1 1 ans N = int(input()) int(input()) N a = int(input()) int(input()) a ans = 0 0 ans b = False False b
import math

ans = 0
N = int(input())
for i in range(N):
    a = int(input())
    if a != 2 and a%2 == 0:
        continue
    b = True
    for j in range(3, int(math.sqrt(a))+1, 2):
        if a%j == 0:
            b = False
    if b:
        ans += 1

print(ans)