#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100000000], total;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 1 && a[i] > 0) {
      for (int j = 0; j < sqrt(a[i]); j++)
        if (a[i] % j == 0) {
          total++;
          break;
        }
    }
  }
  cout << total << endl;
  return 0;
}
