#include <bits/stdc++.h>
int main() {
  int i, j, n, a, ans = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a);
    if (a == 2)
      ans++;
    else if ((a % 2) == 0)
      continue;
    else {
      for (j = 3; j < a; j += 2) {
        if ((a % j) == 0) {
          continue;
        }
        ans++;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
