#include <stdio.h>

int main(void)
{
 int n,m[10000],i,j,ans=0;

 scanf("%d",&n);

 for(i=0;i<n;i++){
  scanf("%d",&m[i]);
 }

 for(i=0;i<n;i++){
 
  while(1){

   if(m[i]==2){
    ans++;
    break;
   }

   if( x<2 || (x-1)%2 == 0 ) break;

   j=3;
   while(j<=sqrt(m[i])){
     if(m[i]%j==0){
       ans++;
       break;
     }
     j=j+2;
   }
  }
 }

 printf("%d\n",ans);

 return 0;
}

 