import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] numbers = new int[n];
		int total = 0;
		int y = 0;
		
		for(int i = 0; i < n; i++){
			numbers[i] = scanner.nextInt();
			if(numbers[i] <= 3){
				total++;
			}else if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			}
		}

		System.out.println(total);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] numbers = new int[n];
		int total = 0;
		int y = 0;
		
		for(int i = 0; i < n; i++){
			numbers[i] = scanner.nextInt();
			if(numbers[i] <= 3){
				total++;
			}else if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			}
		}

		System.out.println(total);
	}
} Main public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] numbers = new int[n];
		int total = 0;
		int y = 0;
		
		for(int i = 0; i < n; i++){
			numbers[i] = scanner.nextInt();
			if(numbers[i] <= 3){
				total++;
			}else if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			}
		}

		System.out.println(total);
	} main {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] numbers = new int[n];
		int total = 0;
		int y = 0;
		
		for(int i = 0; i < n; i++){
			numbers[i] = scanner.nextInt();
			if(numbers[i] <= 3){
				total++;
			}else if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			}
		}

		System.out.println(total);
	} BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int[] numbers = new int[n]; numbers new int[n] n int total = 0; total 0 int y = 0; y 0 for(int i = 0; i < n; i++){
			numbers[i] = scanner.nextInt();
			if(numbers[i] <= 3){
				total++;
			}else if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			numbers[i] = scanner.nextInt();
			if(numbers[i] <= 3){
				total++;
			}else if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			}
		} {
			numbers[i] = scanner.nextInt();
			if(numbers[i] <= 3){
				total++;
			}else if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			}
		} numbers[i] = scanner.nextInt() numbers[i] numbers i scanner.nextInt() scanner.nextInt scanner if(numbers[i] <= 3){
				total++;
			}else if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			} numbers[i] <= 3 numbers[i] numbers i 3 {
				total++;
			} total++ total if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			} numbers[i] % 2 != 0 numbers[i] % 2 numbers[i] numbers i 2 0 {
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			} double x = Math.sqrt(numbers[i]); x Math.sqrt(numbers[i]) Math.sqrt Math numbers[i] numbers i for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				} int j = 2; int j = 2; j 2 j <= x j x j++ j++ j {
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				} {
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				} y = 0 y 0 if(numbers[i] % j == 0){
					    y = 1;
						break;
					} numbers[i] % j == 0 numbers[i] % j numbers[i] numbers i j 0 {
					    y = 1;
						break;
					} y = 1 y 1 break; if(y == 0){
				    total++;
				} y == 0 y 0 {
				    total++;
				} total++ total System.out.println(total) System.out.println System.out System System.out total String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] numbers = new int[n];
		int total = 0;
		int y = 0;
		
		for(int i = 0; i < n; i++){
			numbers[i] = scanner.nextInt();
			if(numbers[i] <= 3){
				total++;
			}else if(numbers[i] % 2 != 0){
				double x = Math.sqrt(numbers[i]);
				for(int j = 2; j <= x; j++){
				    y = 0;
					if(numbers[i] % j == 0){
					    y = 1;
						break;
					}
				}
				if(y == 0){
				    total++;
				}
			}
		}

		System.out.println(total);
	}
}