import math
n = int(input())
v = []

for _ in range(n):
    v.append(int(input()))

n_prime = 0
for v_ in v:
    isprime = True

    if v_ <= 1:
        continue

    for i in range(1+int(math.sqrt(v_))):
        if i <= 1:
            continue
        if v_ % i == 0:
            isprime = False
            break

    n_prime = n_prime + isprime

print(n_prime) import math math n = int(input()) n int(input()) int input() input v = [] v [] for _ in range(n):
    v.append(int(input())) _ range(n) range n v.append(int(input())) v.append v append int(input()) int input() input n_prime = 0 n_prime 0 for v_ in v:
    isprime = True

    if v_ <= 1:
        continue

    for i in range(1+int(math.sqrt(v_))):
        if i <= 1:
            continue
        if v_ % i == 0:
            isprime = False
            break

    n_prime = n_prime + isprime v_ v isprime = True isprime True if v_ <= 1:
        continue

     v_ <= 1 v_ 1 continue for i in range(1+int(math.sqrt(v_))):
        if i <= 1:
            continue
        if v_ % i == 0:
            isprime = False
            break

     i range(1+int(math.sqrt(v_))) range 1+int(math.sqrt(v_)) 1 int(math.sqrt(v_)) int math.sqrt(v_) math.sqrt math sqrt v_ if i <= 1:
            continue
         i <= 1 i 1 continue if v_ % i == 0:
            isprime = False
            break

     v_ % i == 0 v_ % i v_ i 0 isprime = False isprime False break n_prime = n_prime + isprime n_prime n_prime + isprime n_prime isprime print(n_prime) print n_prime isprime = False False isprime v = [] [] v isprime = True True isprime n_prime = n_prime + isprime n_prime + isprime n_prime n_prime = 0 0 n_prime n = int(input()) int(input()) n
import math
n = int(input())
v = []

for _ in range(n):
    v.append(int(input()))

n_prime = 0
for v_ in v:
    isprime = True

    if v_ <= 1:
        continue

    for i in range(1+int(math.sqrt(v_))):
        if i <= 1:
            continue
        if v_ % i == 0:
            isprime = False
            break

    n_prime = n_prime + isprime

print(n_prime)
