#include<stdio.h>
#include<stdlib.h>
int main(int argc, char argv[]){
  FILE *fp;
  int a,cnt=0,i,j;
  int *num;
  fp=fopen(argv[1],"w");
  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);
  free(fp);
  free(num);
  return 0;
}

