#include <bits/stdc++.h>
void eth(int *ary, int len) {
  for (int j = 2; j < sqrt(ary[len - 1]); j++) {
    for (int i = 0; i < len; i++) {
      if ((ary[i] != j) && (ary[i] % j == 0)) ary[i] = 0;
    }
  }
}
int main(void) {
  int len, score = 0;
  scanf("%d", &len);
  int ary[len];
  for (int i = 0; i < len; i++) scanf("%d", &ary[i]);
  eth(ary, len);
  for (int i = 0; i < len; i++) {
    if (ary[i] != 0) {
      score++;
    }
  }
  printf("%d\n", score);
  return 0;
}
