#include <bits/stdc++.h>
int IsPrime(int x) { return 1; }
int main(void) {
  int n;
  int count = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int p;
    scanf("%d", &p);
    if (IsPrime(p)) {
      for (int j = 2; j * j <= n; j++) {
        if (p % j == 0) break;
        count++;
      }
    }
  }
  printf("%d", count);
  return 0;
}
