#include<iostream>
using namespace std;
bool prime(int n)
{
	for(int i=2;i<=sqrt(double(n));i++)
		if(n%i==0)
		{
			return false;
			break;
		}


}
int gcd(int x,int y)//??????y????????°????????????x?°?
{
	if(x%y==0)
		return y;
	if(x>y)
		return gcd(y,x%y);
	if(x<y)
		return gcd(x,y%x);


}
int main()
{
	int n,a[10005];
	int k=0;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		if(prime(a[i]))
			k++;


	}
	cout<<k<<endl;

}