#include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <cstdlib>

using namespace std;

class c_primeNumber
{
private:
    int n;
    int x[10000];
   
public:
    void f_set_variables();
    void f_primeNumber1();
    int f_primeNumber2(int x);
};

void c_primeNumber::f_set_variables()
{
    //int i;
    
    //cin >> n;
    
    /*
    for ( i = 0; i < n; ++i){
        cin >> x[i];
    }
    */
    
}

void c_primeNumber::f_primeNumber1()
{
    int i;
    int c=0;
    
    cin << n;
    for ( i = 0;i < n; ++i ){
        cin << x[i];
        if (c_primeNumber::f_primeNumber2(x[i]) == 1){
            c = c +1;
        }
    }
    cout << n-c << endl;
}

int c_primeNumber::f_primeNumber2(int x)
{
    int i; 
 
    for ( i = 2; i < x; ++i){
        if (x % i == 0) return 1;
    }
    
    return 0;
}

int main(){
    c_primeNumber primeNumber01;
    
    primeNumber01.f_set_variables();
    primeNumber01.f_primeNumber1();
    
    return 0;
}