'use strict';

function Main(stdin){
  const input = stdin.trim().split(/\r?\n/g);
  const N = Number(input[0]);
  let A = input[1].split(' ').map(str => Number(str));
  A.sort(((a, b) => a - b));

  for(let i = 0; i < A.length; i++){
      for(let j = i+1; j < A.length; j++){      
        if(A[j]%A[i] === 0 && A[j] !==A[i]) {
          A.splice(j,1);
          j--;
        }
      }
  }
  for(let k = 0; k < N; k++){
    let firstIndex = A.indexOf(A[k]);
    let lastIndex = A.lastIndexOf(A[k]);
    if(firstIndex !== lastIndex){
        A.splice(firstIndex,lastIndex+1);
    }
  }
  console.log(A.length);
}

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