import java.util.*;
import java.math.*;
public class Main{
    public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	while(s.hasNext()){
	    int c = 0;
	    for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    }
	    System.out.printf("%d\n",c);
	}
    }
} import java.util.*; util.* java import java.math.*; math.* java public class Main{
    public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	while(s.hasNext()){
	    int c = 0;
	    for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    }
	    System.out.printf("%d\n",c);
	}
    }
} Main public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	while(s.hasNext()){
	    int c = 0;
	    for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    }
	    System.out.printf("%d\n",c);
	}
    } main {
	Scanner s = new Scanner(System.in);
	while(s.hasNext()){
	    int c = 0;
	    for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    }
	    System.out.printf("%d\n",c);
	}
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) while(s.hasNext()){
	    int c = 0;
	    for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    }
	    System.out.printf("%d\n",c);
	} s.hasNext() s.hasNext s {
	    int c = 0;
	    for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    }
	    System.out.printf("%d\n",c);
	} int c = 0; c 0 for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    } int i=s.nextInt(); int i=s.nextInt(); i s.nextInt() s.nextInt s i>0 i 0 --i --i i {
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    } {
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    } BigInteger b = new BigInteger(s.next()); b new BigInteger(s.next()) if(b.isProbablePrime(5))++c; b.isProbablePrime(5) b.isProbablePrime b 5 ++c c System.out.printf("%d\n",c) System.out.printf System.out System System.out "%d\n" c String[] args args public class Main{
    public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	while(s.hasNext()){
	    int c = 0;
	    for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    }
	    System.out.printf("%d\n",c);
	}
    }
} public class Main{
    public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	while(s.hasNext()){
	    int c = 0;
	    for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    }
	    System.out.printf("%d\n",c);
	}
    }
} Main
import java.util.*;
import java.math.*;
public class Main{
    public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	while(s.hasNext()){
	    int c = 0;
	    for(int i=s.nextInt();i>0;--i){
		BigInteger b = new BigInteger(s.next());
		if(b.isProbablePrime(5))++c;
	    }
	    System.out.printf("%d\n",c);
	}
    }
}