function Main(input) {
  var N = parseInt(input.split('\n')[0]);
  var A = input.split("\n")[1].split(" ").map(n => parseInt(n));
  var count = 0;
  for (i = 0; i < N; i++){
    for (j = 0; j < N; j ++) {
      let tmpcount = 0;
      if((A[i] % A[j]) === 0 && i != j){
      count++;
      break;
    }}
  }
  console.log(N - count);
  }

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));