"use strict";

const main = (arg) => {
  const input = arg.trim().split("\n");
  const N = parseInt(input[0]);
  const a_arr_orig = input[1].split(" ").map(i => parseInt(i)).sort((a, b) => b - a);
  const tyohuku = [];
  const a_arr = a_arr_orig.filter(function (x, i, self) {
    if (self.indexOf(x) !== i) tyohuku.push(x);
    return self.indexOf(x) === i;
  });

  let count = 0;

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

    let j = a_arr.length - 1;
    for (; j > i; j--) {
      if (target % a_arr[j] === 0) {
        break;
      }
    }
    if (j === i) count++;
  }

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