#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
int main(void) {
  int n, a, cnt = 0;
  bool ch = true;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    for (int j = 2; j < sqrt(a); j++)
      if (a % 2 == 0) {
        ch = false;
        break;
      }
    if (ch == true) cnt++;
  }
  cout << cnt << endl;
  return 0;
}
