
int main(){

int n_input;
int n;
int i;
int dev;
int sub_count;
int main_count;


scanf("%d",&input_n);

 for(i = 0;i <= input_n;i++){
  scanf("%d",&n);
  
  sub_count = 0;

  for(dev = 2; dev<=n ;dev++){
   if(n % dev == 0)sub_count++;
  } 
  if(sub_count == 2)main_count++;
 }
ptintf("%d",main_count);
}