function main(lines) {
  const N = +lines[0];
  const as = splitN(lines[1]).sort((a, b) => a-b);
  
  for (let i = 0; i < N; i++) {
    if (as[i] === null) continue; 
    const n = as[i];
    for (let j = i+1; j < N; j++) {
      if (as[j] % n == 0) {
        if (as[j] == n) as[i] = null;
        as[j] = null;
      }
    }
  }
  const res = as.filter(v => v!== null).length;
  
  console.log(res);
}


main( require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n") );



function splitN(s) {
  return s.split(' ').map(Number);
}