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