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

public class Main {
	
	public static void  main (String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String wdn = br.readLine();
		int N = Integer.parseInt(wdn);
		int ans = N;
		int num = 0;

		for (int i=0; i< N; i++) {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		}
		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 {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String wdn = br.readLine();
		int N = Integer.parseInt(wdn);
		int ans = N;
		int num = 0;

		for (int i=0; i< N; i++) {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		}
		System.out.println(ans);
	}
} Main public static void  main (String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String wdn = br.readLine();
		int N = Integer.parseInt(wdn);
		int ans = N;
		int num = 0;

		for (int i=0; i< N; i++) {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		}
		System.out.println(ans);
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String wdn = br.readLine();
		int N = Integer.parseInt(wdn);
		int ans = N;
		int num = 0;

		for (int i=0; i< N; i++) {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		}
		System.out.println(ans);
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) String wdn = br.readLine(); wdn br.readLine() br.readLine br int N = Integer.parseInt(wdn); N Integer.parseInt(wdn) Integer.parseInt Integer wdn int ans = N; ans N int num = 0; num 0 for (int i=0; i< N; i++) {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		} int i=0; int i=0; i 0 i< N i N i++ i++ i {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		} {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		} String wdnum = br.readLine(); wdnum br.readLine() br.readLine br num = Integer.parseInt(wdnum) num Integer.parseInt(wdnum) Integer.parseInt Integer wdnum if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			} num == 2 num 2 {
				continue;
			} continue; if (num % 2 ==0){
				ans--;
				continue;
			} num % 2 ==0 num % 2 num 2 0 {
				ans--;
				continue;
			} ans-- ans continue; for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			} int j=3; int j=3; j 3 j<=Math.sqrt(num) j Math.sqrt(num) Math.sqrt Math num j+=2 j+=2 j 2 {
				if (num%j==0) {
					ans--;
					break;
				}
			} {
				if (num%j==0) {
					ans--;
					break;
				}
			} if (num%j==0) {
					ans--;
					break;
				} num%j==0 num%j num j 0 {
					ans--;
					break;
				} ans-- ans break; 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 {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String wdn = br.readLine();
		int N = Integer.parseInt(wdn);
		int ans = N;
		int num = 0;

		for (int i=0; i< N; i++) {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		}
		System.out.println(ans);
	}
} public class Main {
	
	public static void  main (String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String wdn = br.readLine();
		int N = Integer.parseInt(wdn);
		int ans = N;
		int num = 0;

		for (int i=0; i< N; i++) {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		}
		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 {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String wdn = br.readLine();
		int N = Integer.parseInt(wdn);
		int ans = N;
		int num = 0;

		for (int i=0; i< N; i++) {
			String wdnum = br.readLine();
			num = Integer.parseInt(wdnum);
			if (num == 2){
				continue;
			}
			else if (num % 2 ==0){
				ans--;
				continue;
			}
			for (int j=3; j<=Math.sqrt(num); j+=2){
				if (num%j==0) {
					ans--;
					break;
				}
			}
		}
		System.out.println(ans);
	}
}
