function Main(input){
  input = input.trim().split('\n').map(x=>x.split(' ').map(y=>parseInt(y)));
  var n = input[0][0];
  var a = input[1];
  var i = 0;
  while (i<a.length){
    var same = 0;
    var j = 0;
    while (j<a.length){
      if (i !== j && a[j]%a[i] === 0){
        if (a[i] === a[j]){
          same = 1;
        }
        a.splice(j,1);
        if (j < i){
          i -= 1;
        }
      }else{
        j++;
      }
    }
    if (same == 1){
      a.splice(i,1);
    }else{
      i++;
    }
  }
  console.log(a.length);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));