from sys import stdin

n = int(input())

xs = [int(input()) for _ in range(n)]

ans = 0
for x in xs:
    flg = True
    for y in range(2, int(x**0.5+1)):
        if x % y == 0:
            flg = False
            break
    if flg:
        ans += 1

print(ans) from sys import stdin n = int(input()) n int(input()) int input() input int(input()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) int(input()) int input() input xs = [int(input()) for _ in range(n)] xs [int(input()) for _ in range(n)] ans = 0 ans 0 for x in xs:
    flg = True
    for y in range(2, int(x**0.5+1)):
        if x % y == 0:
            flg = False
            break
    if flg:
        ans += 1 x xs flg = True flg True for y in range(2, int(x**0.5+1)):
        if x % y == 0:
            flg = False
            break
     y range(2, int(x**0.5+1)) range 2 int(x**0.5+1) int x**0.5+1 x**0.5 x 0.5 1 if x % y == 0:
            flg = False
            break
     x % y == 0 x % y x y 0 flg = False flg False break if flg:
        ans += 1 flg ans += 1 ans 1 print(ans) print ans n = int(input()) int(input()) n ans = 0 0 ans xs = [int(input()) for _ in range(n)] [int(input()) for _ in range(n)] xs flg = True True flg ans += 1 1 ans flg = False False flg
from sys import stdin

n = int(input())

xs = [int(input()) for _ in range(n)]

ans = 0
for x in xs:
    flg = True
    for y in range(2, int(x**0.5+1)):
        if x % y == 0:
            flg = False
            break
    if flg:
        ans += 1

print(ans)