n = gets.to_i
nums = []
n.times {
	nums.push( gets.to_i )
}
nums.sort!

start = 0
for i in ( 2 .. nums[-1] )
	(nums.length-1).downto( start ) { |j|
		if nums[j] == i
			start = j + 1
			break
		end
		if 0 == nums[j]%i
			nums.delete_at( j )
		end
	}
end
puts( nums.length )