def prime_numbers(n):
    cnds = [True] * n
    for x in xrange(2, int(n**0.5 + 1)):
        if cnds[x]:
            for m in xrange(2*x, n, x):
                cnds[m] = False
    return [i for i in xrange(2, n) if cnds[i]]

def is_prime(n):
    return all(n % m for m in primes if m < n)

primes = prime_numbers(10**4)
N = input()
print sum(is_prime(input()) for i in range(N)) def prime_numbers(n):
    cnds = [True] * n
    for x in xrange(2, int(n**0.5 + 1)):
        if cnds[x]:
            for m in xrange(2*x, n, x):
                cnds[m] = False
    return [i for i in xrange(2, n) if cnds[i]] prime_numbers cnds = [True] * n cnds [True] * n [True] True n for x in xrange(2, int(n**0.5 + 1)):
        if cnds[x]:
            for m in xrange(2*x, n, x):
                cnds[m] = False
     x xrange(2, int(n**0.5 + 1)) xrange 2 int(n**0.5 + 1) int n**0.5 + 1 n**0.5 n 0.5 1 if cnds[x]:
            for m in xrange(2*x, n, x):
                cnds[m] = False
     cnds[x] cnds x for m in xrange(2*x, n, x):
                cnds[m] = False
     m xrange(2*x, n, x) xrange 2*x 2 x n x cnds[m] = False cnds[m] cnds m False i for i in xrange(2, n) if cnds[i] for i in xrange(2, n) if cnds[i] i xrange(2, n) xrange 2 n cnds[i] cnds i if cnds[i] i return [i for i in xrange(2, n) if cnds[i]] [i for i in xrange(2, n) if cnds[i]] n n def is_prime(n):
    return all(n % m for m in primes if m < n) is_prime return all(n % m for m in primes if m < n) all(n % m for m in primes if m < n) all n % m n m n n primes = prime_numbers(10**4) primes prime_numbers(10**4) prime_numbers 10**4 10 4 N = input() N input() input print sum(is_prime(input()) for i in range(N)) sum is_prime(input()) is_prime input() input N = input() input() N def is_prime(n):
    return all(n % m for m in primes if m < n) def is_prime(n):
    return all(n % m for m in primes if m < n) is_prime def prime_numbers(n):
    cnds = [True] * n
    for x in xrange(2, int(n**0.5 + 1)):
        if cnds[x]:
            for m in xrange(2*x, n, x):
                cnds[m] = False
    return [i for i in xrange(2, n) if cnds[i]] def prime_numbers(n):
    cnds = [True] * n
    for x in xrange(2, int(n**0.5 + 1)):
        if cnds[x]:
            for m in xrange(2*x, n, x):
                cnds[m] = False
    return [i for i in xrange(2, n) if cnds[i]] prime_numbers primes = prime_numbers(10**4) prime_numbers(10**4) primes
def prime_numbers(n):
    cnds = [True] * n
    for x in xrange(2, int(n**0.5 + 1)):
        if cnds[x]:
            for m in xrange(2*x, n, x):
                cnds[m] = False
    return [i for i in xrange(2, n) if cnds[i]]

def is_prime(n):
    return all(n % m for m in primes if m < n)

primes = prime_numbers(10**4)
N = input()
print sum(is_prime(input()) for i in range(N))