#include <stdio.h>
#include <math.h>
??
int check(int x)
{
????int y=3;
??
????while(y<=sqrt(x)){
????????if(x%y==0) return 0;
??
????????y+=2;
????}
????return 1;
}
??
int main(){
int num[10000], i, number, x;
int M=0;
??
scanf("%d", &number);
for(i=0; i<number; i++){
????scanf("%d", &num[i]);
}
??
for(i=0; i<number; i++){
??
????if(num[i]==2){
????????M++;
????????continue;
????}
????else if(num[i]<2||num[i]%2==0){
????????continue;
????}
????x=check(num[i]);
????if(x==1) M++;
}
printf("%d\n", M);
return 0;
}
??