const [nStr, aStr] = require('fs').readFileSync('/dev/stdin', 'utf8').split(/\n/)
const n = Number(nStr)
const as = aStr.split(/\s/).map(Number)

let result = 0

for (let i = 0; i < n; i++) {
  result += Number(as.every((a, j) => i === j || as[i] % as[j] !== 0))
}
console.log(result)