#include <iostream>
#include <utility>
#include <algorithm>
#include <cmath>
using namespace std;
bool check(int x){
????????if (x==2) return true;
????????else if(x<2||x%2==0)return false;
????????int i=3;
????????while(i <= sqrt(x)){
????????if(x%i==0)return false;
????????i=i+2;
????????}
????????return true;
}???? //T???F???????????????°check()????????????if?????????§??´????¨???§?????????
??
??
??
int main(){
????????int n,x,count=0;
????????cin >> n;
????????for(int i=0;i<n;i++){
????????????????cin >> x;
????????????????if(check(x))count++;
??
????????}
????????cout << count << endl;
}