"use strict";

const main = (arg) => {
  const input = arg.trim().split("\n");
  const N = parseInt(input[0]);
  const a_arr = input[1].split(" ").map(i => parseInt(i)).sort((a, b) => b - a);

  let count = 0;

  for (let i = 0; i < a_arr.length; i++) {
    const target = a_arr[i]; // 割る数

    let j = i + 1;
    for (; j < a_arr.length; j++) {
      if (Number.isInteger(target / a_arr[j])) {
        break;
      }
    }
    if (j === a_arr.length && (i === 0 || target !== a_arr[i - 1])) count++;
  }

  console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));  
