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

  const judge = (aj, ai) => {
    return ai % aj === 0;
  };

  const isNotDividable = (ai, i) => {
    let Aj = [...Ai];
    Aj.splice(i, 1);

    return ![...new Set(Aj)].some((aj) => judge(aj, ai));
  };

  const count = Ai.filter(isNotDividable).length;

  console.log(count);
};

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