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