local read = io.read
local insert = table.insert
local N = read("*n")
local A = {}
local has_A_s = {}

for i = 1, N do
	local num = read("*n")
	if has_A_s[num] == nil then
		has_A_s[num] = true
		insert(A, num)
	end
end

local count = 0
for i = 1, #A do
	for j = 1, #A do
		if i == j then
		elseif A[i] % A[j] == 0 then
			count = count + 1
			break
		end
	end
end

print((#A == 1) and 0 or #A - count)
