from math import sqrt, floor


def is_prime(p):
    for i in range(2, floor(sqrt(p)) + 1):
        if not p % i:
            return False
    return True


n = int(input())
print(sum(is_prime(int(input())) for _ in range(n))) from math import sqrt, floor def is_prime(p):
    for i in range(2, floor(sqrt(p)) + 1):
        if not p % i:
            return False
    return True is_prime for i in range(2, floor(sqrt(p)) + 1):
        if not p % i:
            return False
     i range(2, floor(sqrt(p)) + 1) range 2 floor(sqrt(p)) + 1 floor(sqrt(p)) floor sqrt(p) sqrt p 1 if not p % i:
            return False
     not p % i p % i p i return False False return True True p p n = int(input()) n int(input()) int input() input print(sum(is_prime(int(input())) for _ in range(n))) print sum(is_prime(int(input())) for _ in range(n)) sum is_prime(int(input())) is_prime int(input()) int input() input def is_prime(p):
    for i in range(2, floor(sqrt(p)) + 1):
        if not p % i:
            return False
    return True def is_prime(p):
    for i in range(2, floor(sqrt(p)) + 1):
        if not p % i:
            return False
    return True is_prime n = int(input()) int(input()) n
from math import sqrt, floor


def is_prime(p):
    for i in range(2, floor(sqrt(p)) + 1):
        if not p % i:
            return False
    return True


n = int(input())
print(sum(is_prime(int(input())) for _ in range(n)))