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