n = int(raw_input())
a = []
for i in range(n):
    a.append(int(raw_input()))

primes = [True]*n
for d in range(2,10001):
    for i in range(n):
        if d!=a[i] and a[i]%d==0:
            primes[i] = False

print sum(primes)