#include <bits/stdc++.h>
using namespace std;
bool Prime(int n) {
  for (int i = 2; i < n; ++i) {
    if (n % 2 == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  int n;
  int c = 0;
  int v;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> v;
    if (Prime(v)) {
      ++c;
    }
  }
  cout << c << endl;
}
