def is_prime(x):
    if x == 2:
        return True
    if (x < 2) or (x%2 == 0):
        return False
    return all(x%i for i in xrange(3, int(x**(0.5) + 1), 2))

N = input()
print sum(is_prime(input()) for i in range(N)) def is_prime(x):
    if x == 2:
        return True
    if (x < 2) or (x%2 == 0):
        return False
    return all(x%i for i in xrange(3, int(x**(0.5) + 1), 2)) is_prime if x == 2:
        return True
     x == 2 x 2 return True True if (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 return all(x%i for i in xrange(3, int(x**(0.5) + 1), 2)) all(x%i for i in xrange(3, int(x**(0.5) + 1), 2)) all x%i x i x x N = input() N input() input print sum(is_prime(input()) for i in range(N)) sum is_prime(input()) is_prime input() input def is_prime(x):
    if x == 2:
        return True
    if (x < 2) or (x%2 == 0):
        return False
    return all(x%i for i in xrange(3, int(x**(0.5) + 1), 2)) def is_prime(x):
    if x == 2:
        return True
    if (x < 2) or (x%2 == 0):
        return False
    return all(x%i for i in xrange(3, int(x**(0.5) + 1), 2)) is_prime N = input() input() N
def is_prime(x):
    if x == 2:
        return True
    if (x < 2) or (x%2 == 0):
        return False
    return all(x%i for i in xrange(3, int(x**(0.5) + 1), 2))

N = input()
print sum(is_prime(input()) for i in range(N))