function main(input) {
  input = input.trim()
  const args = input.split("\n")

  const n = Number(args[0])
  const a = args[1].split(' ').map(Number).sort((a, b) => a - b).reverse()

  const half = Math.max.apply(null, a) / 2
  const divisors = a.filter(num => num < half)

  if (!divisors.length) return console.log(0)

  let count = 0

  for (let i = 0; i < n; i++) {
    for (let j = divisors.length - 1; j >= 0; j--) {
      if (a[i] === divisors[j]) {
        continue
      }
      if (a[i] % divisors[j] === 0) {
        count++
        break
      }
    }
  }

  console.log(n - count)
}

main(require("fs").readFileSync("/dev/stdin", "utf8"))
