const main = (input) => {
  input = input.trim().split('\n')
  const n = input[1].split(' ').map(Number).sort((a, b) => a - b)

  let ans = 0

  for (let i=0; i<n.length; i++) {
    let d = false
    if ((n[i-1] && n[i-1] === n[i]) || (n[i+1] && n[i+1] === n[i])) continue

    for (let l=0; l<i; l++) {
      if (n[i] % n[l] === 0) {
        d = true
        break
      }
    }
    if (!d) ans++
  }

  return console.log(ans)
}

process.env.MYTEST
  ? (process.env.MYTEST === 'test' ? test() : main(require('fs').readFileSync('dev/stdin', 'utf8')))
  : main(require('fs').readFileSync('/dev/stdin', 'utf8'))