#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int prime = 0;
  for (int i : A) {
    cin >> i;
  }
  for (int i : A) {
    for (int j = 0; j < i; j++) {
      if (i % j == 0) {
        prime++;
        break;
      }
    }
  }
  cout << prime << endl;
}
