#include<stdio.h>

int isPrime(int a)
{
int i;
if(a<2 || a%2==0)return 0;
else if(a==2)return 1;
for(i=3;i*i<=a;i=i+2){

if(a%i == 0)
return 0;
}
return 1;
}

int main()
{
int n,x[10000],i;
int count=0;

  scanf("%d",&n);
for(i=0;i<n;i++){
 scanf("%d",&x[i]);
 if(func(x[i]))count++;
}
printf("%d\n",count);
return 0;
}