const main = (input) => {
  const args = input.trim().split("\n");
  const Ai = args[1]
    .trim()
    .split(" ")
    .map((n) => parseInt(n, 10));

  const MAX = 10 ** 6;
  const checkMarks = new Array(MAX + 1).fill(0);
  for (const a of Ai) {
    if (checkMarks[a] !== 0) {
      checkMarks[a] = 2;
      continue;
    }
    for (const i of checkMarks.keys()) {
      const position = (i + 1) * a;
      if (position > MAX) break;
      checkMarks[position] += 1;
    }
  }

  const isNotDivided = (n) => checkMarks[n] === 1;
  const answer = Ai.filter(isNotDivided).length;

  console.log(answer);
};

main(require("fs").readFileSync("/dev/stdin", "utf8"));