# coding:utf-8
import math
n = input()
array = []
index = 0
for i in range(n):
    array.append(input())
array.sort()
while True:
    p = array[index]
    index += 1
    if p >= math.sqrt(array[-1]):
        break
    array.pop(index - 1)
    for i in range(len(array)):
        if array[i] % p == 0:
            array[i] = 0
    array = [a for a in array if a != 0]
    array.insert(index - 1, p)
print len(array)