from math import sqrt
n = int(input())
e = sorted([int(input()) for _ in range(n)])
L, pnum, tmp = sqrt(e[-1]+1), [], [i for i in range(2, e[-1]+1)]
while tmp[0] < L:
    v = tmp.pop(0)
    pnum.append(v)
    tmp = list(filter(lambda x: x%v!=0, tmp))
for t in tmp: pnum.append(t)
print(sum(1 for v in e if v in pnum))