import java.util.Scanner;

public class Main {

	public static boolean check(double a){
		double b;
		b = Math.sqrt(a);
		if(b>1.0 && b<2.0) return true;

		for(int i=2;i<=(int)Math.floor(b);i++){
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		}
		return true;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i,c=0,n;
		double tmp;
		n = sc.nextInt();

		for(i=0;i<n;i++){
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		}
		System.out.println(c);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static boolean check(double a){
		double b;
		b = Math.sqrt(a);
		if(b>1.0 && b<2.0) return true;

		for(int i=2;i<=(int)Math.floor(b);i++){
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		}
		return true;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i,c=0,n;
		double tmp;
		n = sc.nextInt();

		for(i=0;i<n;i++){
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		}
		System.out.println(c);
	}

} Main public static boolean check(double a){
		double b;
		b = Math.sqrt(a);
		if(b>1.0 && b<2.0) return true;

		for(int i=2;i<=(int)Math.floor(b);i++){
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		}
		return true;
	} check {
		double b;
		b = Math.sqrt(a);
		if(b>1.0 && b<2.0) return true;

		for(int i=2;i<=(int)Math.floor(b);i++){
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		}
		return true;
	} double b; b b = Math.sqrt(a) b Math.sqrt(a) Math.sqrt Math a if(b>1.0 && b<2.0) return true; b>1.0 && b<2.0 b>1.0 b 1.0 b<2.0 b 2.0 return true; true for(int i=2;i<=(int)Math.floor(b);i++){
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		} int i=2; int i=2; i 2 i<=(int)Math.floor(b) i (int)Math.floor(b) Math.floor Math b i++ i++ i {
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		} {
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		} if((a%2.0) == 0.0) return false; (a%2.0) == 0.0 (a%2.0) a 2.0 0.0 return false; false if((a%(double)i) == 0.0) return false; (a%(double)i) == 0.0 (a%(double)i) a (double)i 0.0 return false; false return true; true double a a public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i,c=0,n;
		double tmp;
		n = sc.nextInt();

		for(i=0;i<n;i++){
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		}
		System.out.println(c);
	} main {
		Scanner sc = new Scanner(System.in);
		int i,c=0,n;
		double tmp;
		n = sc.nextInt();

		for(i=0;i<n;i++){
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		}
		System.out.println(c);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int i i c=0 c 0 n; n double tmp; tmp n = sc.nextInt() n sc.nextInt() sc.nextInt sc for(i=0;i<n;i++){
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		} {
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		} tmp = sc.nextDouble() tmp sc.nextDouble() sc.nextDouble sc if(check(tmp)) c++;
			else continue; check(tmp) check tmp c++ c continue; System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {

	public static boolean check(double a){
		double b;
		b = Math.sqrt(a);
		if(b>1.0 && b<2.0) return true;

		for(int i=2;i<=(int)Math.floor(b);i++){
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		}
		return true;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i,c=0,n;
		double tmp;
		n = sc.nextInt();

		for(i=0;i<n;i++){
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		}
		System.out.println(c);
	}

} public class Main {

	public static boolean check(double a){
		double b;
		b = Math.sqrt(a);
		if(b>1.0 && b<2.0) return true;

		for(int i=2;i<=(int)Math.floor(b);i++){
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		}
		return true;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i,c=0,n;
		double tmp;
		n = sc.nextInt();

		for(i=0;i<n;i++){
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		}
		System.out.println(c);
	}

} Main
import java.util.Scanner;

public class Main {

	public static boolean check(double a){
		double b;
		b = Math.sqrt(a);
		if(b>1.0 && b<2.0) return true;

		for(int i=2;i<=(int)Math.floor(b);i++){
			if((a%2.0) == 0.0) return false;
			if((a%(double)i) == 0.0) return false;
		}
		return true;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i,c=0,n;
		double tmp;
		n = sc.nextInt();

		for(i=0;i<n;i++){
			tmp = sc.nextDouble();
			if(check(tmp)) c++;
			else continue;
		}
		System.out.println(c);
	}

}
