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