#include <stdio.h>
#include <vector>
#include <algorithm>

int gcd(int x, int y) {

	if (y == 0) return x;
	if (x >= y) return gcd(y, x % y);
	else return gcd(x, y % x);
}

bool isprime(int a) {
	if (a == 1) return false;

	for (int i = 2; i < a; i++) {
		if (a % i == 0) return false;
	}

	return true;
}

int main() {
	int n;
	std::vector<int> d;

	scanf_s("%d", &n);
	for (int i = 0; i < n; i++) {
		int b;
		scanf_s("%d", &b);
		d.push_back(b);
	}

	printf("%d", 
		std::count_if(d.begin(), d.end(),isprime));

	return 0;
}