#include <bits/stdc++.h>
using namespace std;
int n;
int A[10000];
int i, j;
int c;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    scanf("%d", &(A[i]));
  }
  for (i = 0; i < n; i++) {
    if (A[i] == 0 or A[i] == 1) {
      c = c;
    } else {
      for (j = 2; j <= A[i]; j++) {
        if (A[i] == j) {
          c = c + 1;
        } else if (A[i] % j == 0) {
          break;
        }
      }
    }
  }
  cout << c << '\n';
  return (0);
}
