#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, d = 0;
  cin >> a;
  for (int i = 0; i < a; i++) {
    int b, c = 0;
    cin >> b;
    for (int o = 1; o <= b; o++) {
      if (b % o == 0) c++;
    }
    if (c == 2) d++;
  }
  cout << d << endl;
}
