import math


def is_prime(num):
    if num == 2:
        return True
    elif not num & 1:
        return False

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


N = int(input())
nums = [int(input()) for _ in range(N)]
ans = len([num for num in nums if is_prime(num)])
print(ans) import math math def is_prime(num):
    if num == 2:
        return True
    elif not num & 1:
        return False

    for i in range(3, math.ceil(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True is_prime if num == 2:
        return True
    elif not num & 1:
        return False

     num == 2 num 2 return True True elif not num & 1:
        return False

     not num & 1 num & 1 num 1 return False False for i in range(3, math.ceil(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
     i range(3, math.ceil(math.sqrt(num))+1, 2) range 3 math.ceil(math.sqrt(num))+1 math.ceil(math.sqrt(num)) math.ceil math ceil 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 N = int(input()) N int(input()) int input() input int(input()) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) int(input()) int input() input nums = [int(input()) for _ in range(N)] nums [int(input()) for _ in range(N)] num for num in nums if is_prime(num) for num in nums if is_prime(num) num nums is_prime(num) is_prime num if is_prime(num) num ans = len([num for num in nums if is_prime(num)]) ans len([num for num in nums if is_prime(num)]) len [num for num in nums if is_prime(num)] print(ans) print ans nums = [int(input()) for _ in range(N)] [int(input()) for _ in range(N)] nums ans = len([num for num in nums if is_prime(num)]) len([num for num in nums if is_prime(num)]) ans def is_prime(num):
    if num == 2:
        return True
    elif not num & 1:
        return False

    for i in range(3, math.ceil(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True def is_prime(num):
    if num == 2:
        return True
    elif not num & 1:
        return False

    for i in range(3, math.ceil(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True is_prime N = int(input()) int(input()) N
import math


def is_prime(num):
    if num == 2:
        return True
    elif not num & 1:
        return False

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


N = int(input())
nums = [int(input()) for _ in range(N)]
ans = len([num for num in nums if is_prime(num)])
print(ans)