from math import sqrt
n = int(input())
ans = 0
for i in range(n):
    x = int(input())
    ok = 1
    for z in range(2, int(sqrt(x))+1):
        if x % z == 0:
            ok = 0
            break
    ans += ok
print(ans) from math import sqrt n = int(input()) n int(input()) int input() input ans = 0 ans 0 for i in range(n):
    x = int(input())
    ok = 1
    for z in range(2, int(sqrt(x))+1):
        if x % z == 0:
            ok = 0
            break
    ans += ok i range(n) range n x = int(input()) x int(input()) int input() input ok = 1 ok 1 for z in range(2, int(sqrt(x))+1):
        if x % z == 0:
            ok = 0
            break
     z range(2, int(sqrt(x))+1) range 2 int(sqrt(x))+1 int(sqrt(x)) int sqrt(x) sqrt x 1 if x % z == 0:
            ok = 0
            break
     x % z == 0 x % z x z 0 ok = 0 ok 0 break ans += ok ans ok print(ans) print ans n = int(input()) int(input()) n ans = 0 0 ans ans += ok ok ans ok = 0 0 ok ok = 1 1 ok x = int(input()) int(input()) x
from math import sqrt
n = int(input())
ans = 0
for i in range(n):
    x = int(input())
    ok = 1
    for z in range(2, int(sqrt(x))+1):
        if x % z == 0:
            ok = 0
            break
    ans += ok
print(ans)