#include <iostream>
#include <math.h>
using namespace std;

bool isPrime(int x) {
    if (k == 2) {
        return 2;
    }if (k %2 == 0) {
        return false;
    }
    for (int w = 3; w < sqrt(x); w+=2) {
        if (x % w == 0) {
            return false;
        }
    }
    return true;
}

int main() {
    int i, p;
    int count = 0;
    cin >> i;
    for (int j = 0; j < i; j++) {
        cin >> p;
        if (isPrime(p)){
            count++;
        }
    }
    cout << count << endl;
}
