function main(input) {
  const n = parseInt(input[0]);
  const a = sort(input[1].trim().split(" ").map(i => parseInt(i)));

  let cnt = 0;
  for(let i=0;i<n;i++){
    let judge = true;
    for(let j=n;i<j;j--){
      if(a[i]%a[j]===0){
        judge = false;
        break;
      }
    }
    if(judge){
      cnt++;
    }
  }
  if(a.length>1){
    if((a[a.length-1]===a[a.length-2])){
      cnt--;
    }
  }else{
    cnt = 0;
  }
  console.log(cnt);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));

function sort(arr){return arr.sort(function(a, b) {return b - a;})}