from math import sqrt

def prime_numbers(n):
    total = 0
    for x in n:
        if is_prime(x):
            total += 1
    return total

def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False

    for i in range(3, int(sqrt(x)) + 1, 2):
        if x % i == 0:
            return False
    return True

if __name__ == '__main__':
    n = []
    for _ in range(int(input())):
        n.append(int(input()))
    print(prime_numbers(n))
 from math import sqrt def prime_numbers(n):
    total = 0
    for x in n:
        if is_prime(x):
            total += 1
    return total prime_numbers total = 0 total 0 for x in n:
        if is_prime(x):
            total += 1
     x n if is_prime(x):
            total += 1
     is_prime(x) is_prime x total += 1 total 1 return total total n n def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False

    for i in range(3, int(sqrt(x)) + 1, 2):
        if x % i == 0:
            return False
    return True is_prime if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False

     x == 2 x 2 return True True elif x < 2 or x % 2 == 0:
        return False

     x < 2 or x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return False False for i in range(3, int(sqrt(x)) + 1, 2):
        if x % i == 0:
            return False
     i range(3, int(sqrt(x)) + 1, 2) range 3 int(sqrt(x)) + 1 int(sqrt(x)) int sqrt(x) sqrt x 1 2 if x % i == 0:
            return False
     x % i == 0 x % i x i 0 return False False return True True x x if __name__ == '__main__':
    n = []
    for _ in range(int(input())):
        n.append(int(input()))
    print(prime_numbers(n)) __name__ == '__main__' __name__ '__main__' n = [] n [] for _ in range(int(input())):
        n.append(int(input()))
     _ range(int(input())) range int(input()) int input() input n.append(int(input())) n.append n append int(input()) int input() input print(prime_numbers(n)) print prime_numbers(n) prime_numbers n n = [] [] n def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False

    for i in range(3, int(sqrt(x)) + 1, 2):
        if x % i == 0:
            return False
    return True def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False

    for i in range(3, int(sqrt(x)) + 1, 2):
        if x % i == 0:
            return False
    return True is_prime def prime_numbers(n):
    total = 0
    for x in n:
        if is_prime(x):
            total += 1
    return total def prime_numbers(n):
    total = 0
    for x in n:
        if is_prime(x):
            total += 1
    return total prime_numbers
from math import sqrt

def prime_numbers(n):
    total = 0
    for x in n:
        if is_prime(x):
            total += 1
    return total

def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False

    for i in range(3, int(sqrt(x)) + 1, 2):
        if x % i == 0:
            return False
    return True

if __name__ == '__main__':
    n = []
    for _ in range(int(input())):
        n.append(int(input()))
    print(prime_numbers(n))

