const [nStr, aStr] = require('fs').readFileSync('/dev/stdin', 'utf8').split(/\n/)
const nums = []
let result = 0
aStr.split(/\s/).map(Number).sort((a, b) => a - b).forEach((a, i, arr) => {
  if (a === arr[i - 1]) {
    if (a !== arr[i - 2]) {
	    result -= 1
    }
    return
  }
  if (nums.every(num => a % num !== 0)) {
    nums.push(a)
    result += 1
  }
})
console.log(result)