#include<stdio.h>

int main(){

int n, i, j, num, count = 0, cnt = 0;

scanf("%d",&n);

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

cnt = 0

scanf("%d",&num);

for(j = 1; j <= num; j++){

if(num % j == 0) cnt++

}

if(cnt == 2) count++;

}

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

return 0;

}
