let lines=[];
const reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', function (line) {
  lines.push(line);
});
reader.on('close', function () {
  const total = parseInt(lines.shift(), 10);
  const vals = lines.shift().split(' ').map(l => {
    return parseInt(l, 10);
  });

  let cnt = 0;
  for(let i = vals.length - 1; i >= 0; i -= 1) {
    let found = false;
    for(let i2 = 0; i2 < vals.length; i2 += 1) {
      if (i === i2 || vals[i] < vals[i2]) {
        continue;
      }
      if (vals[i] % vals[i2] === 0) {
        found = true;
        break;
      }
    }
    if (found === false) {
      cnt += 1;
    }
  }

  console.log(cnt);

});