#include <stdio.h>
 
int main(){

   int n, x, y, z = 0, r;
   int N[10000];
 
   scanf("%d", &n);

   for (x = 0; x < n; x++)
     scanf("%d", &N[x]);
   for (x = 0; x < n; x++){
     y = 1;
     for (r =2; r <= sqrt(N[x]) && y != 0; r++) {
         y = N[a] % r;
         if (y == 0) z++;
     }
   }
         
   printf("%d\n", n - c);
 
   return 0;
 
}