import math

def isprime(num):
    if num == 2:
        return True
    if num == 1 or num % 2 == 0:
        return False
    i = 3
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True


def count_prime_numbers(number_list):
    cnt = 0
    for target in number_list:
        if isprime(target):
            cnt += 1
    return cnt

N = int(input())
A = [int(input()) for i in range(N)]
print(count_prime_numbers(A)) import math math def isprime(num):
    if num == 2:
        return True
    if num == 1 or num % 2 == 0:
        return False
    i = 3
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True isprime if num == 2:
        return True
     num == 2 num 2 return True True if num == 1 or num % 2 == 0:
        return False
     num == 1 or num % 2 == 0 num == 1 num 1 num % 2 == 0 num % 2 num 2 0 return False False i = 3 i 3 for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
     i range(3, math.floor(math.sqrt(num))+1, 2) range 3 math.floor(math.sqrt(num))+1 math.floor(math.sqrt(num)) math.floor math floor math.sqrt(num) math.sqrt math sqrt num 1 2 if num % i == 0:
            return False
     num % i == 0 num % i num i 0 return False False return True True num num def count_prime_numbers(number_list):
    cnt = 0
    for target in number_list:
        if isprime(target):
            cnt += 1
    return cnt count_prime_numbers cnt = 0 cnt 0 for target in number_list:
        if isprime(target):
            cnt += 1
     target number_list if isprime(target):
            cnt += 1
     isprime(target) isprime target cnt += 1 cnt 1 return cnt cnt number_list number_list N = int(input()) N int(input()) int input() input int(input()) for i in range(N) for i in range(N) i range(N) range N for i in range(N) int(input()) int input() input A = [int(input()) for i in range(N)] A [int(input()) for i in range(N)] print(count_prime_numbers(A)) print count_prime_numbers(A) count_prime_numbers A def count_prime_numbers(number_list):
    cnt = 0
    for target in number_list:
        if isprime(target):
            cnt += 1
    return cnt def count_prime_numbers(number_list):
    cnt = 0
    for target in number_list:
        if isprime(target):
            cnt += 1
    return cnt count_prime_numbers A = [int(input()) for i in range(N)] [int(input()) for i in range(N)] A N = int(input()) int(input()) N def isprime(num):
    if num == 2:
        return True
    if num == 1 or num % 2 == 0:
        return False
    i = 3
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True def isprime(num):
    if num == 2:
        return True
    if num == 1 or num % 2 == 0:
        return False
    i = 3
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True isprime
import math

def isprime(num):
    if num == 2:
        return True
    if num == 1 or num % 2 == 0:
        return False
    i = 3
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True


def count_prime_numbers(number_list):
    cnt = 0
    for target in number_list:
        if isprime(target):
            cnt += 1
    return cnt

N = int(input())
A = [int(input()) for i in range(N)]
print(count_prime_numbers(A))