from math import sqrt


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

result = 0
for i in range(int(input())):
    result += isprime(int(input()))
print(result) from math import sqrt def isprime(n):
    if n == 2:
        return True
    if n % 2 == 0:
        return False
    for i in range(3, int(sqrt(n)) + 1, 2):
        if n % i == 0:
            return False
    return True isprime if n == 2:
        return True
     n == 2 n 2 return True True if n % 2 == 0:
        return False
     n % 2 == 0 n % 2 n 2 0 return False False for i in range(3, int(sqrt(n)) + 1, 2):
        if n % i == 0:
            return False
     i range(3, int(sqrt(n)) + 1, 2) range 3 int(sqrt(n)) + 1 int(sqrt(n)) int sqrt(n) 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 result = 0 result 0 for i in range(int(input())):
    result += isprime(int(input())) i range(int(input())) range int(input()) int input() input result += isprime(int(input())) result isprime(int(input())) isprime int(input()) int input() input print(result) print result result = 0 0 result result += isprime(int(input())) isprime(int(input())) result def isprime(n):
    if n == 2:
        return True
    if n % 2 == 0:
        return False
    for i in range(3, int(sqrt(n)) + 1, 2):
        if n % i == 0:
            return False
    return True def isprime(n):
    if n == 2:
        return True
    if n % 2 == 0:
        return False
    for i in range(3, int(sqrt(n)) + 1, 2):
        if n % i == 0:
            return False
    return True isprime
from math import sqrt


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

result = 0
for i in range(int(input())):
    result += isprime(int(input()))
print(result)