import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();

		int count = 0;
		for(int i = 0; i < N; i++){
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		}
		
		System.out.println(count);
		
	}
} import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();

		int count = 0;
		for(int i = 0; i < N; i++){
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		}
		
		System.out.println(count);
		
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();

		int count = 0;
		for(int i = 0; i < N; i++){
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		}
		
		System.out.println(count);
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();

		int count = 0;
		for(int i = 0; i < N; i++){
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		}
		
		System.out.println(count);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int i = 0; i < N; i++){
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		} {
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		} final int number = sc.nextInt(); number sc.nextInt() sc.nextInt sc final int limit = (int)(Math.sqrt(number)); limit (int)(Math.sqrt(number)) Math.sqrt Math number boolean not_prime = false; not_prime false for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			} int j = 2; int j = 2; j 2 j <= limit j limit j++ j++ j {
				if(number % j == 0){
					not_prime = true;
					break;
				}
			} {
				if(number % j == 0){
					not_prime = true;
					break;
				}
			} if(number % j == 0){
					not_prime = true;
					break;
				} number % j == 0 number % j number j 0 {
					not_prime = true;
					break;
				} not_prime = true not_prime true break; count += not_prime ? 0 : 1 count not_prime ? 0 : 1 not_prime 0 1 System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {
	
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();

		int count = 0;
		for(int i = 0; i < N; i++){
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		}
		
		System.out.println(count);
		
	}
} public class Main {
	
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();

		int count = 0;
		for(int i = 0; i < N; i++){
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		}
		
		System.out.println(count);
		
	}
} Main
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();

		int count = 0;
		for(int i = 0; i < N; i++){
			final int number = sc.nextInt();
			
			final int limit = (int)(Math.sqrt(number));
			
			boolean not_prime = false;
			for(int j = 2; j <= limit; j++){
				if(number % j == 0){
					not_prime = true;
					break;
				}
			}
			
			count += not_prime ? 0 : 1;
		}
		
		System.out.println(count);
		
	}
}