#include <bits/stdc++.h>
using namespace std;
int main() {
  long n;
  cin >> n;
  long cnt = 0;
  for (long i = 0; i < n; i++) {
    long m;
    cin >> m;
    bool p = 0;
    for (long j = 0; j < sqrt(m); j++) {
      if (m % j == 0) {
        p = 1;
        break;
      }
    }
    if (p == 1) cnt++;
  }
  cout << cnt << endl;
  return 0;
}
