#include <bits/stdc++.h>
int main() {
  int n, i, j, a;
  int nun[10000];
  int count = 0;
  scanf("%d\n", &n);
  for (i = 0; i < n; i++) scanf("%d\n", &nun[i]);
  for (i = 0; i < n; i++) {
    a = 0;
    for (j = 1; j < nun[i]; j++) {
      if (nun[i] % j != 0) a = 1;
    }
    if (a == 0) count++;
  }
  printf("%d\n", count);
}
