#include <bits/stdc++.h>
int isPrime(int s) {
  int i, n = s;
  while (n != i) {
    if (n % i)
      i++;
    else
      n /= i;
  }
  if (s == i)
    return 1;
  else
    return 0;
}
int main() {
  int n, a = 0;
  while (scanf("%d", &n) != 0) {
    if (isPrime(n)) a++;
  }
  printf("%d\n", a);
  return 0;
}
