def is_prime(x):
    if x <= 1:
        return False
    i = 2
    while i * i <= x:
        if x % i == 0:
            return False
        i += 1
    return True

cnt = 0
for _ in range(int(input())):
    if is_prime(int(input())):
        cnt += 1
print(cnt) def is_prime(x):
    if x <= 1:
        return False
    i = 2
    while i * i <= x:
        if x % i == 0:
            return False
        i += 1
    return True is_prime if x <= 1:
        return False
     x <= 1 x 1 return False False i = 2 i 2 while i * i <= x:
        if x % i == 0:
            return False
        i += 1
     i * i <= x i * i i i x if x % i == 0:
            return False
         x % i == 0 x % i x i 0 return False False i += 1 i 1 return True True x x cnt = 0 cnt 0 for _ in range(int(input())):
    if is_prime(int(input())):
        cnt += 1 _ range(int(input())) range int(input()) int input() input if is_prime(int(input())):
        cnt += 1 is_prime(int(input())) is_prime int(input()) int input() input cnt += 1 cnt 1 print(cnt) print cnt cnt = 0 0 cnt cnt += 1 1 cnt def is_prime(x):
    if x <= 1:
        return False
    i = 2
    while i * i <= x:
        if x % i == 0:
            return False
        i += 1
    return True def is_prime(x):
    if x <= 1:
        return False
    i = 2
    while i * i <= x:
        if x % i == 0:
            return False
        i += 1
    return True is_prime
def is_prime(x):
    if x <= 1:
        return False
    i = 2
    while i * i <= x:
        if x % i == 0:
            return False
        i += 1
    return True

cnt = 0
for _ in range(int(input())):
    if is_prime(int(input())):
        cnt += 1
print(cnt)