import java.util.Scanner;

public class Main{

	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		int i,n,num,count=0;
		n=scan.nextInt();
		for(i=0;i<n;i++) {
			num=scan.nextInt();
			count+=checkpm(num);
		}
		System.out.println(count);
		scan.close();
	}
	public static int checkem(int num) {
		return num%2;
	}
	public static int checkpm(int num) {
		int i,ans;
		double root;
		if(num==2) {
			return 1;
		}
		ans=checkem(num);
		if(ans==0) {
			return 0;
		}
		else {
			root=Math.sqrt(num);
			for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			}
		}
		return 1;
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		int i,n,num,count=0;
		n=scan.nextInt();
		for(i=0;i<n;i++) {
			num=scan.nextInt();
			count+=checkpm(num);
		}
		System.out.println(count);
		scan.close();
	}
	public static int checkem(int num) {
		return num%2;
	}
	public static int checkpm(int num) {
		int i,ans;
		double root;
		if(num==2) {
			return 1;
		}
		ans=checkem(num);
		if(ans==0) {
			return 0;
		}
		else {
			root=Math.sqrt(num);
			for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			}
		}
		return 1;
	}
} Main public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		int i,n,num,count=0;
		n=scan.nextInt();
		for(i=0;i<n;i++) {
			num=scan.nextInt();
			count+=checkpm(num);
		}
		System.out.println(count);
		scan.close();
	} main {
		Scanner scan=new Scanner(System.in);
		int i,n,num,count=0;
		n=scan.nextInt();
		for(i=0;i<n;i++) {
			num=scan.nextInt();
			count+=checkpm(num);
		}
		System.out.println(count);
		scan.close();
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int i i n n num num count=0; count 0 n=scan.nextInt() n scan.nextInt() scan.nextInt scan for(i=0;i<n;i++) {
			num=scan.nextInt();
			count+=checkpm(num);
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			num=scan.nextInt();
			count+=checkpm(num);
		} {
			num=scan.nextInt();
			count+=checkpm(num);
		} num=scan.nextInt() num scan.nextInt() scan.nextInt scan count+=checkpm(num) count checkpm(num) checkpm num System.out.println(count) System.out.println System.out System System.out count scan.close() scan.close scan String[] args args public static int checkem(int num) {
		return num%2;
	} checkem {
		return num%2;
	} return num%2; num%2 num 2 int num num public static int checkpm(int num) {
		int i,ans;
		double root;
		if(num==2) {
			return 1;
		}
		ans=checkem(num);
		if(ans==0) {
			return 0;
		}
		else {
			root=Math.sqrt(num);
			for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			}
		}
		return 1;
	} checkpm {
		int i,ans;
		double root;
		if(num==2) {
			return 1;
		}
		ans=checkem(num);
		if(ans==0) {
			return 0;
		}
		else {
			root=Math.sqrt(num);
			for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			}
		}
		return 1;
	} int i i ans; ans double root; root if(num==2) {
			return 1;
		} num==2 num 2 {
			return 1;
		} return 1; 1 ans=checkem(num) ans checkem(num) checkem num if(ans==0) {
			return 0;
		}
		else {
			root=Math.sqrt(num);
			for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			}
		} ans==0 ans 0 {
			return 0;
		} return 0; 0 {
			root=Math.sqrt(num);
			for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			}
		} root=Math.sqrt(num) root Math.sqrt(num) Math.sqrt Math num for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			} i=3; i=3 i 3 i<=root i root i+=2 i+=2 i 2 {
				if(num%i==0) {
					return 0;
				}
			} {
				if(num%i==0) {
					return 0;
				}
			} if(num%i==0) {
					return 0;
				} num%i==0 num%i num i 0 {
					return 0;
				} return 0; 0 return 1; 1 int num num public class Main{

	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		int i,n,num,count=0;
		n=scan.nextInt();
		for(i=0;i<n;i++) {
			num=scan.nextInt();
			count+=checkpm(num);
		}
		System.out.println(count);
		scan.close();
	}
	public static int checkem(int num) {
		return num%2;
	}
	public static int checkpm(int num) {
		int i,ans;
		double root;
		if(num==2) {
			return 1;
		}
		ans=checkem(num);
		if(ans==0) {
			return 0;
		}
		else {
			root=Math.sqrt(num);
			for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			}
		}
		return 1;
	}
} public class Main{

	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		int i,n,num,count=0;
		n=scan.nextInt();
		for(i=0;i<n;i++) {
			num=scan.nextInt();
			count+=checkpm(num);
		}
		System.out.println(count);
		scan.close();
	}
	public static int checkem(int num) {
		return num%2;
	}
	public static int checkpm(int num) {
		int i,ans;
		double root;
		if(num==2) {
			return 1;
		}
		ans=checkem(num);
		if(ans==0) {
			return 0;
		}
		else {
			root=Math.sqrt(num);
			for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			}
		}
		return 1;
	}
} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		int i,n,num,count=0;
		n=scan.nextInt();
		for(i=0;i<n;i++) {
			num=scan.nextInt();
			count+=checkpm(num);
		}
		System.out.println(count);
		scan.close();
	}
	public static int checkem(int num) {
		return num%2;
	}
	public static int checkpm(int num) {
		int i,ans;
		double root;
		if(num==2) {
			return 1;
		}
		ans=checkem(num);
		if(ans==0) {
			return 0;
		}
		else {
			root=Math.sqrt(num);
			for(i=3;i<=root;i+=2) {
				if(num%i==0) {
					return 0;
				}
			}
		}
		return 1;
	}
}
