#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    int d = 2;
    while (1) {
      if (x % d == 0) {
        if (x == d) {
          sum++;
          break;
        } else {
          break;
        }
      }
      d++;
    }
  }
  cout << sum << endl;
}
