#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  FILE *fp;
  int a, cnt = 0, i, j;
  int *num;
  fp = fopen(argv[1], "r");
  fscanf(fp, "%d", &a);
  num = (int *)malloc(a * sizeof(int));
  for (i = 0; i < a; i++) {
    fscanf(fp, "%d", &num[i]);
    for (j = num[i] - 1; 1 <= j; j--) {
      if (j == 1) cnt++;
      if (num[i] % j == 0) break;
    }
  }
  printf("%d\n", cnt);
  fclose(fp);
  free(num);
  return 0;
}
