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

  const judge = (aj, j, ai, i) => {
    if (j === i) return false;
    return ai % aj === 0;
  };
  const isNotDividable = (ai, i) => {
    return !Ai.some((aj, j) => judge(aj, j, ai, i));
  };

  const count = Ai.reduce((a, c, i) => {
    if (a.includes(c)) return a;
    if (isNotDividable(c, i)) return [...a, c];
    return a;
  }, []).length;

  console.log(count);
};

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