import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main (String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int[] numbers = new int[n];
		
		for (int i = 0; i < n; i++){
			numbers[i] = Integer.parseInt(br.readLine());;
		}
		
		int ans = 0;
		
		for (int i = 0; i < numbers.length; i++) {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		}
		
		System.out.println(ans);
		
	}
	
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main (String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int[] numbers = new int[n];
		
		for (int i = 0; i < n; i++){
			numbers[i] = Integer.parseInt(br.readLine());;
		}
		
		int ans = 0;
		
		for (int i = 0; i < numbers.length; i++) {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		}
		
		System.out.println(ans);
		
	}
	
} Main public static void main (String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int[] numbers = new int[n];
		
		for (int i = 0; i < n; i++){
			numbers[i] = Integer.parseInt(br.readLine());;
		}
		
		int ans = 0;
		
		for (int i = 0; i < numbers.length; i++) {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		}
		
		System.out.println(ans);
		
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int[] numbers = new int[n];
		
		for (int i = 0; i < n; i++){
			numbers[i] = Integer.parseInt(br.readLine());;
		}
		
		int ans = 0;
		
		for (int i = 0; i < numbers.length; i++) {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		}
		
		System.out.println(ans);
		
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int[] numbers = new int[n]; numbers new int[n] n for (int i = 0; i < n; i++){
			numbers[i] = Integer.parseInt(br.readLine());;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			numbers[i] = Integer.parseInt(br.readLine());;
		} {
			numbers[i] = Integer.parseInt(br.readLine());;
		} numbers[i] = Integer.parseInt(br.readLine()) numbers[i] numbers i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int ans = 0; ans 0 for (int i = 0; i < numbers.length; i++) {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		} int i = 0; int i = 0; i 0 i < numbers.length i numbers.length numbers numbers.length i++ i++ i {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		} {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		} boolean flag = true; flag true int j = 2; j 2 while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			} j <= Math.sqrt(numbers[i]) j Math.sqrt(numbers[i]) Math.sqrt Math numbers[i] numbers i {
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			} if(numbers[i] % j == 0){
					flag = false;
					break;
				} numbers[i] % j == 0 numbers[i] % j numbers[i] numbers i j 0 {
					flag = false;
					break;
				} flag = false flag false break; j++ j if (flag){
				ans++;
			} flag {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main (String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int[] numbers = new int[n];
		
		for (int i = 0; i < n; i++){
			numbers[i] = Integer.parseInt(br.readLine());;
		}
		
		int ans = 0;
		
		for (int i = 0; i < numbers.length; i++) {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		}
		
		System.out.println(ans);
		
	}
	
} public class Main {

	public static void main (String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int[] numbers = new int[n];
		
		for (int i = 0; i < n; i++){
			numbers[i] = Integer.parseInt(br.readLine());;
		}
		
		int ans = 0;
		
		for (int i = 0; i < numbers.length; i++) {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		}
		
		System.out.println(ans);
		
	}
	
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main (String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int[] numbers = new int[n];
		
		for (int i = 0; i < n; i++){
			numbers[i] = Integer.parseInt(br.readLine());;
		}
		
		int ans = 0;
		
		for (int i = 0; i < numbers.length; i++) {
			boolean flag = true; 
			
			int j = 2;
			while(j <= Math.sqrt(numbers[i])){
				if(numbers[i] % j == 0){
					flag = false;
					break;
				}
				j++;
			}
			
			if (flag){
				ans++;
			}
			
		}
		
		System.out.println(ans);
		
	}
	
}