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