primes = [2]

def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return False
    return True

def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i]

create_primes(primes, 10000)

n = int(input())
count = 0
for _ in range(n):
    num = int(input())
    count += 1 if is_prime(num) else 0
print(count) primes = [2] primes [2] 2 def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return False
    return True is_prime root = num ** 0.5 root num ** 0.5 num 0.5 for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return False
     prime primes if root < prime:
            break
         root < prime root prime break if num % prime == 0:
            return False
     num % prime == 0 num % prime num prime 0 return False False return True True num num def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i] create_primes for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i] i range(primes[-1] + 1,max) range primes[-1] + 1 primes[-1] primes -1 1 max if is_prime(i):
            primes += [i] is_prime(i) is_prime i primes += [i] primes [i] i primes primes max max create_primes(primes, 10000) create_primes primes 10000 n = int(input()) n int(input()) int input() input count = 0 count 0 for _ in range(n):
    num = int(input())
    count += 1 if is_prime(num) else 0 _ range(n) range n num = int(input()) num int(input()) int input() input count += 1 if is_prime(num) else 0 count 1 if is_prime(num) else 0 is_prime(num) is_prime num 1 0 print(count) print count primes = [2] [2] primes count += 1 if is_prime(num) else 0 1 if is_prime(num) else 0 count num = int(input()) int(input()) num def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i] def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i] create_primes def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return False
    return True def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return False
    return True is_prime count = 0 0 count n = int(input()) int(input()) n
primes = [2]

def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return False
    return True

def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i]

create_primes(primes, 10000)

n = int(input())
count = 0
for _ in range(n):
    num = int(input())
    count += 1 if is_prime(num) else 0
print(count)