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