#include <bits/stdc++.h>
int main() {
  int cprime = 0, num, i, numb[10000], j;
  scanf("%d", num);
  for (i = 0; i < num; i++) {
    scanf("%lf", &numb[i]);
  }
  for (i = 0; i < num; i++) {
    while (1) {
      for (j = 3; j <= sqrt((double)numb[i]); j += 2) {
        if (numb[i] % j == 0) {
          cprime++;
          break;
        }
      }
    }
  }
  printf("%d\n", cprime);
  return 0;
}
