#include <iostream>
using namespace std;
bool primes[100000000]={true};
bool IsPrime(p)
{
    return primes[p];
}
int main(void)
{
    int count=0;
    int n;
    cin>>n;
    for(int i =0;i<n;i++)
    {
        int p;
        cin>>p;
        if(IsPrime(p))
        {
            count++;
        }
    }
    cout<<count<<endl;
    return 0;
}

