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

  const n = Number(args[0])
  const a = args[1].split(' ').map(Number)

  let count = 0

  for (let i = 0; i < n; i++) {
    for (let j = 0; j < n; j++) {
      if (j === i) {
        continue
      }
      if (a[i] % a[j] === 0) {
        count++
        break
      }
    }
  }

  console.log(n - count)
}

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