#include <bits/stdc++.h>
int main(void) {
  int a, b, c;
  int total = 0;
  scanf("%d", &a);
  for (; a > 0; a--) {
    scanf("%d", &b);
    if (b == 2) total += 1;
    if (b >= 3 && b % 2 == 1) {
      for (c = 3; c < b; c += 2) {
        if (b % c == 0) break;
        total += 1;
      }
    }
  }
  printf("%d\n", total);
}
