from math import sqrt;

count = int(input());
data = [];
for n in range(count):
    data.append(int(input()));

def prime_number(data):
    max_divisor = get_max_divisor(data);
    divisor_primes = get_prime(max_divisor);
    count = 0;
    for n in data:
        ok = 1;
        for p in divisor_primes:
            if n < p:
                ok = 0;
                break;
            elif n == p:
                break;
            elif n % p == 0:
                ok = 0;
                break;
        count += ok;
    return count;

def get_max_divisor(data):
    maxN = data[0];
    for n in data[1:]:
        if n > maxN:
            maxN = n;
    return int(sqrt(maxN)) + 1;

def get_prime(max_divisor):
    primes = [];
    for n in range(2, max_divisor + 1):
        is_prime = True;
        for p in primes:
            if n % p == 0:
                is_prime = False;
        if is_prime:
            primes.append(n);
    return primes;

print(prime_number(data)); from math import sqrt count = int(input()) count int(input()) int input() input data = [] data [] for n in range(count):
    data.append(int(input())); n range(count) range count data.append(int(input())) data.append data append int(input()) int input() input def prime_number(data):
    max_divisor = get_max_divisor(data);
    divisor_primes = get_prime(max_divisor);
    count = 0;
    for n in data:
        ok = 1;
        for p in divisor_primes:
            if n < p:
                ok = 0;
                break;
            elif n == p:
                break;
            elif n % p == 0:
                ok = 0;
                break;
        count += ok;
    return count; prime_number max_divisor = get_max_divisor(data) max_divisor get_max_divisor(data) get_max_divisor data divisor_primes = get_prime(max_divisor) divisor_primes get_prime(max_divisor) get_prime max_divisor count = 0 count 0 for n in data:
        ok = 1;
        for p in divisor_primes:
            if n < p:
                ok = 0;
                break;
            elif n == p:
                break;
            elif n % p == 0:
                ok = 0;
                break;
        count += ok;
     n data ok = 1 ok 1 for p in divisor_primes:
            if n < p:
                ok = 0;
                break;
            elif n == p:
                break;
            elif n % p == 0:
                ok = 0;
                break;
         p divisor_primes if n < p:
                ok = 0;
                break;
            elif n == p:
                break;
            elif n % p == 0:
                ok = 0;
                break;
         n < p n p ok = 0 ok 0 break elif n == p:
                break;
             n == p n p break elif n % p == 0:
                ok = 0;
                break;
         n % p == 0 n % p n p 0 ok = 0 ok 0 break count += ok count ok return count count data data def get_max_divisor(data):
    maxN = data[0];
    for n in data[1:]:
        if n > maxN:
            maxN = n;
    return int(sqrt(maxN)) + 1; get_max_divisor maxN = data[0] maxN data[0] data 0 for n in data[1:]:
        if n > maxN:
            maxN = n;
     n data[1:] data 1: 1 if n > maxN:
            maxN = n;
     n > maxN n maxN maxN = n maxN n return int(sqrt(maxN)) + 1 int(sqrt(maxN)) + 1 int(sqrt(maxN)) int sqrt(maxN) sqrt maxN 1 data data def get_prime(max_divisor):
    primes = [];
    for n in range(2, max_divisor + 1):
        is_prime = True;
        for p in primes:
            if n % p == 0:
                is_prime = False;
        if is_prime:
            primes.append(n);
    return primes; get_prime primes = [] primes [] for n in range(2, max_divisor + 1):
        is_prime = True;
        for p in primes:
            if n % p == 0:
                is_prime = False;
        if is_prime:
            primes.append(n);
     n range(2, max_divisor + 1) range 2 max_divisor + 1 max_divisor 1 is_prime = True is_prime True for p in primes:
            if n % p == 0:
                is_prime = False;
         p primes if n % p == 0:
                is_prime = False;
         n % p == 0 n % p n p 0 is_prime = False is_prime False if is_prime:
            primes.append(n);
     is_prime primes.append(n) primes.append primes append n return primes primes max_divisor max_divisor print(prime_number(data)) print prime_number(data) prime_number data data = [] [] data def get_prime(max_divisor):
    primes = [];
    for n in range(2, max_divisor + 1):
        is_prime = True;
        for p in primes:
            if n % p == 0:
                is_prime = False;
        if is_prime:
            primes.append(n);
    return primes; def get_prime(max_divisor):
    primes = [];
    for n in range(2, max_divisor + 1):
        is_prime = True;
        for p in primes:
            if n % p == 0:
                is_prime = False;
        if is_prime:
            primes.append(n);
    return primes; get_prime def prime_number(data):
    max_divisor = get_max_divisor(data);
    divisor_primes = get_prime(max_divisor);
    count = 0;
    for n in data:
        ok = 1;
        for p in divisor_primes:
            if n < p:
                ok = 0;
                break;
            elif n == p:
                break;
            elif n % p == 0:
                ok = 0;
                break;
        count += ok;
    return count; def prime_number(data):
    max_divisor = get_max_divisor(data);
    divisor_primes = get_prime(max_divisor);
    count = 0;
    for n in data:
        ok = 1;
        for p in divisor_primes:
            if n < p:
                ok = 0;
                break;
            elif n == p:
                break;
            elif n % p == 0:
                ok = 0;
                break;
        count += ok;
    return count; prime_number def get_max_divisor(data):
    maxN = data[0];
    for n in data[1:]:
        if n > maxN:
            maxN = n;
    return int(sqrt(maxN)) + 1; def get_max_divisor(data):
    maxN = data[0];
    for n in data[1:]:
        if n > maxN:
            maxN = n;
    return int(sqrt(maxN)) + 1; get_max_divisor count = int(input()) int(input()) count
from math import sqrt;

count = int(input());
data = [];
for n in range(count):
    data.append(int(input()));

def prime_number(data):
    max_divisor = get_max_divisor(data);
    divisor_primes = get_prime(max_divisor);
    count = 0;
    for n in data:
        ok = 1;
        for p in divisor_primes:
            if n < p:
                ok = 0;
                break;
            elif n == p:
                break;
            elif n % p == 0:
                ok = 0;
                break;
        count += ok;
    return count;

def get_max_divisor(data):
    maxN = data[0];
    for n in data[1:]:
        if n > maxN:
            maxN = n;
    return int(sqrt(maxN)) + 1;

def get_prime(max_divisor):
    primes = [];
    for n in range(2, max_divisor + 1):
        is_prime = True;
        for p in primes:
            if n % p == 0:
                is_prime = False;
        if is_prime:
            primes.append(n);
    return primes;

print(prime_number(data));
