#include <bits/stdc++.h>
bool isPrime(int num) {
  if (num < 2) return false;
  if (num == 2) return false;
  if (num % 2 == 0) return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) return false;
  }
  return true;
}
int main() {
  int a[100000] = {};
  int n;
  int count = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (isPrime(a[i])) count++;
  }
  printf("%d\n", count + 1);
  return 0;
}
