#include <bits/stdc++.h>
int isPrime(int num) {
  if (num == 2) return 1;
  if (num == 3) return 1;
  if (num == 4) return 0;
  if (num == 5) return 1;
  for (int i = 2; i * i < num; i++) {
    if (num % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main(int argc, const char *argv[]) {
  int n, value, maximum, ans;
  maximum = 0;
  scanf("%d", &n);
  int *array = NULL;
  array = (int *)malloc(sizeof(int) * n);
  int *flag = NULL;
  flag = (int *)malloc(sizeof(int) * n);
  memset(flag, 0x00, sizeof(int) * n);
  for (int i = 0; i < (n); i++) {
    scanf("%d", &value);
    maximum = maximum > value ? maximum : value;
    array[i] = value;
  }
  ans = 0;
  for (int i = 0; i < n; i++) {
    if (isPrime(array[i])) {
      ans += 1;
    }
  }
  printf("%d?\n", ans);
  return 0;
}
