import math
n = int(input())

A = [0] * n
for i in range(n):
    A[i] = int(input())

# Naive method
def is_prime(n):
    if n < 2:
        return False
    elif n == 2 or n == 3 or n == 5 or n == 7:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                return False
    return True

print(len([x for x in A if is_prime(x)])) import math math n = int(input()) n int(input()) int input() input A = [0] * n A [0] * n [0] 0 n for i in range(n):
    A[i] = int(input())

# Naive method i range(n) range n A[i] = int(input()) A[i] A i int(input()) int input() input def is_prime(n):
    if n < 2:
        return False
    elif n == 2 or n == 3 or n == 5 or n == 7:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                return False
    return True is_prime if n < 2:
        return False
    elif n == 2 or n == 3 or n == 5 or n == 7:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                return False
     n < 2 n 2 return False False elif n == 2 or n == 3 or n == 5 or n == 7:
        return True
     n == 2 or n == 3 or n == 5 or n == 7 n == 2 or n == 3 or n == 5 n == 2 or n == 3 n == 2 n 2 n == 3 n 3 n == 5 n 5 n == 7 n 7 return True True elif n % 2 == 0:
        return False
     n % 2 == 0 n % 2 n 2 0 return False False for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                return False
     i range(3, int(math.sqrt(n))+1, 2) range 3 int(math.sqrt(n))+1 int(math.sqrt(n)) int math.sqrt(n) math.sqrt math sqrt n 1 2 if n % i == 0:
                return False
     n % i == 0 n % i n i 0 return False False return True True n n x for x in A if is_prime(x) for x in A if is_prime(x) x A is_prime(x) is_prime x if is_prime(x) x print(len([x for x in A if is_prime(x)])) print len([x for x in A if is_prime(x)]) len [x for x in A if is_prime(x)] A = [0] * n [0] * n A n = int(input()) int(input()) n def is_prime(n):
    if n < 2:
        return False
    elif n == 2 or n == 3 or n == 5 or n == 7:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                return False
    return True def is_prime(n):
    if n < 2:
        return False
    elif n == 2 or n == 3 or n == 5 or n == 7:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                return False
    return True is_prime
import math
n = int(input())

A = [0] * n
for i in range(n):
    A[i] = int(input())

# Naive method
def is_prime(n):
    if n < 2:
        return False
    elif n == 2 or n == 3 or n == 5 or n == 7:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                return False
    return True

print(len([x for x in A if is_prime(x)]))