#include <fstream>
using namespace std;
ifstream in("fantastice.in");
ofstream out("fantastice.out");
bool prim(int n)
{
int i;
if(n==1)
return 0;
if(n<4)
return 1;
i=2;
while(i*i<=n){
if(n%i==0 )
return 0;
i+=1;
}
return 1;
}
int nrdiv(int n)
{int i,c=1,y=2,p;
//c este nr de divizori
while(n>1)
{ p=0;
while(n%y==0)
{
n/=y;p++;
}
c=c*(p+1);
y=y+1;
if(y*y>n)y=n;
}
return c;
}
int main()
{int d,x,n,fan=0;
in>>n;
for(int i=1; i<=n; i++){
in>>x;
d=nrdiv(x);
if(prim(d))
fan++;
}
out<<fan;
}