#include <bits/stdc++.h>
int main() {
  int i, j, k, sum;
  int array[10000];
  for (i = 1; i <= 10000; i++) {
    array[i] = 0;
  }
  while (scanf("%d", &k) != EOF) {
    array[k]++;
  }
  sum = array[1];
  for (i = 2; i <= 10000; i++) {
    if (array[i] == -1) continue;
    sum += array[i];
    j = 2;
    while (i * j <= 10000) {
      array[i * j] = -1;
      j++;
    }
  }
  printf("%d\n", sum);
  return 0;
}
