#include <stdio.h>

int main(){

int n[1000],count[1000],k,s;

k=0;

scanf("%d\n",&s);

for(i=0;i<s;i++){
 scanf("%d\n",&n[i]);
 for(j=1;j<=n[i];j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
 if(count[i]==2){
  k=k+1;
   }
  }
}

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

return 0;
}

