'use strict';

const inputs = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');
const foo = (str) => str.split(' ').map(v => parseInt(v, 10));

inputs.shift();
const numbers = Array.from(new Set(foo(inputs.shift())));

if (numbers.length === 1) {
  console.log(0)
  return;
}

let result = 0;
for (const number1 of numbers) {
  let found = false;

  for (const number2 of numbers) {
    if (number1 === number2) continue;

    if (number1 % number2 === 0) {
      found = true;
      break;
    }
  }

  if (found) {
    ++result;
  }
}

console.log(numbers.length - result);