from math import sqrt
def isprime(inlst, i, sq):
    while sq >= i:
    	inlst = [x for x in inlst if x%i > 0 or x == i]
    	i += 2
    return inlst
n = int(input())
inlst = []
for i in range(n):
    inlst.append(int(input()))
inlst = [x for x in inlst if x%2 > 0 or x == 2]
i = 3
maxin = max(inlst)
inlst = isprime(inlst, i, int(sqrt(maxin)) + 1)
print(len(inlst)) from math import sqrt def isprime(inlst, i, sq):
    while sq >= i:
    	inlst = [x for x in inlst if x%i > 0 or x == i]
    	i += 2
    return inlst isprime while sq >= i:
    	inlst = [x for x in inlst if x%i > 0 or x == i]
    	i += 2
     sq >= i sq i x for x in inlst if x%i > 0 or x == i for x in inlst if x%i > 0 or x == i x inlst x%i > 0 or x == i x%i > 0 x%i x i 0 x == i x i if x%i > 0 or x == i x inlst = [x for x in inlst if x%i > 0 or x == i] inlst [x for x in inlst if x%i > 0 or x == i] i += 2 i 2 return inlst inlst inlst inlst i i sq sq n = int(input()) n int(input()) int input() input inlst = [] inlst [] for i in range(n):
    inlst.append(int(input())) i range(n) range n inlst.append(int(input())) inlst.append inlst append int(input()) int input() input x for x in inlst if x%2 > 0 or x == 2 for x in inlst if x%2 > 0 or x == 2 x inlst x%2 > 0 or x == 2 x%2 > 0 x%2 x 2 0 x == 2 x 2 if x%2 > 0 or x == 2 x inlst = [x for x in inlst if x%2 > 0 or x == 2] inlst [x for x in inlst if x%2 > 0 or x == 2] i = 3 i 3 maxin = max(inlst) maxin max(inlst) max inlst inlst = isprime(inlst, i, int(sqrt(maxin)) + 1) inlst isprime(inlst, i, int(sqrt(maxin)) + 1) isprime inlst i int(sqrt(maxin)) + 1 int(sqrt(maxin)) int sqrt(maxin) sqrt maxin 1 print(len(inlst)) print len(inlst) len inlst inlst = [x for x in inlst if x%2 > 0 or x == 2] [x for x in inlst if x%2 > 0 or x == 2] inlst inlst = [] [] inlst def isprime(inlst, i, sq):
    while sq >= i:
    	inlst = [x for x in inlst if x%i > 0 or x == i]
    	i += 2
    return inlst def isprime(inlst, i, sq):
    while sq >= i:
    	inlst = [x for x in inlst if x%i > 0 or x == i]
    	i += 2
    return inlst isprime i = 3 3 i inlst = isprime(inlst, i, int(sqrt(maxin)) + 1) isprime(inlst, i, int(sqrt(maxin)) + 1) inlst n = int(input()) int(input()) n maxin = max(inlst) max(inlst) maxin
from math import sqrt
def isprime(inlst, i, sq):
    while sq >= i:
    	inlst = [x for x in inlst if x%i > 0 or x == i]
    	i += 2
    return inlst
n = int(input())
inlst = []
for i in range(n):
    inlst.append(int(input()))
inlst = [x for x in inlst if x%2 > 0 or x == 2]
i = 3
maxin = max(inlst)
inlst = isprime(inlst, i, int(sqrt(maxin)) + 1)
print(len(inlst))