#include <bits/stdc++.h>
int main() {
  int count, prime = 0, temp;
  scanf("%d", &count);
  for (int i = 0; i < count; i++) {
    temp = 0;
    scanf("%d", &temp);
    for (int n = 1; n < sqrt(temp); n++) {
      if (temp % n == 0) {
        prime++;
        break;
      }
    }
  }
  printf("%d\n", prime);
  return 0;
}
