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