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

    return Ai.every((aj, j) => {
      if(j === i) return false;
      return ai % aj !== 0;
    });
  };
 
  const count = Ai.filter((ai, i) => isNotDividable(ai, i)).filter((b) => b).length;
 
  console.log(count);
};
 
main(require("fs").readFileSync("/dev/stdin", "utf8"));