import math
def is_prime(x):
    if x == 2:
        return True
    if (x % 2 == 0):
        return False
    m = math.ceil(math.sqrt(x))
    for i in range(3, m + 1):
        if x % i == 0:
            return False
    return True


n = int(input())

prime = 0
for i in range(n):
    x = int(input())
    if is_prime(x):
        prime += 1

print(prime) import math math def is_prime(x):
    if x == 2:
        return True
    if (x % 2 == 0):
        return False
    m = math.ceil(math.sqrt(x))
    for i in range(3, m + 1):
        if x % i == 0:
            return False
    return True is_prime if x == 2:
        return True
     x == 2 x 2 return True True if (x % 2 == 0):
        return False
     x % 2 == 0 x % 2 x 2 0 return False False m = math.ceil(math.sqrt(x)) m math.ceil(math.sqrt(x)) math.ceil math ceil math.sqrt(x) math.sqrt math sqrt x for i in range(3, m + 1):
        if x % i == 0:
            return False
     i range(3, m + 1) range 3 m + 1 m 1 if x % i == 0:
            return False
     x % i == 0 x % i x i 0 return False False return True True x x n = int(input()) n int(input()) int input() input prime = 0 prime 0 for i in range(n):
    x = int(input())
    if is_prime(x):
        prime += 1 i range(n) range n x = int(input()) x int(input()) int input() input if is_prime(x):
        prime += 1 is_prime(x) is_prime x prime += 1 prime 1 print(prime) print prime def is_prime(x):
    if x == 2:
        return True
    if (x % 2 == 0):
        return False
    m = math.ceil(math.sqrt(x))
    for i in range(3, m + 1):
        if x % i == 0:
            return False
    return True def is_prime(x):
    if x == 2:
        return True
    if (x % 2 == 0):
        return False
    m = math.ceil(math.sqrt(x))
    for i in range(3, m + 1):
        if x % i == 0:
            return False
    return True is_prime prime = 0 0 prime x = int(input()) int(input()) x n = int(input()) int(input()) n prime += 1 1 prime
import math
def is_prime(x):
    if x == 2:
        return True
    if (x % 2 == 0):
        return False
    m = math.ceil(math.sqrt(x))
    for i in range(3, m + 1):
        if x % i == 0:
            return False
    return True


n = int(input())

prime = 0
for i in range(n):
    x = int(input())
    if is_prime(x):
        prime += 1

print(prime)