import java.io.*;
import java.util.Arrays;
import java.util.Scanner;

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 sum = 0;
		for (int i = 0 ; i<n ; i++ ) {
			int num = Integer.parseInt(br.readLine());
			if ( num == 2 || num == 3) {
				sum++;
				continue;
			}
			double nd = (double) num;
			nd = Math.sqrt(nd);
			int a = (int) nd;
			if ( num % 2 == 1) {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			}
		}
		System.out.println(sum);
	}
} import java.io.*; io.* java import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util 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 sum = 0;
		for (int i = 0 ; i<n ; i++ ) {
			int num = Integer.parseInt(br.readLine());
			if ( num == 2 || num == 3) {
				sum++;
				continue;
			}
			double nd = (double) num;
			nd = Math.sqrt(nd);
			int a = (int) nd;
			if ( num % 2 == 1) {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			}
		}
		System.out.println(sum);
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int sum = 0;
		for (int i = 0 ; i<n ; i++ ) {
			int num = Integer.parseInt(br.readLine());
			if ( num == 2 || num == 3) {
				sum++;
				continue;
			}
			double nd = (double) num;
			nd = Math.sqrt(nd);
			int a = (int) nd;
			if ( num % 2 == 1) {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			}
		}
		System.out.println(sum);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int sum = 0;
		for (int i = 0 ; i<n ; i++ ) {
			int num = Integer.parseInt(br.readLine());
			if ( num == 2 || num == 3) {
				sum++;
				continue;
			}
			double nd = (double) num;
			nd = Math.sqrt(nd);
			int a = (int) nd;
			if ( num % 2 == 1) {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			}
		}
		System.out.println(sum);
	} 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 sum = 0; sum 0 for (int i = 0 ; i<n ; i++ ) {
			int num = Integer.parseInt(br.readLine());
			if ( num == 2 || num == 3) {
				sum++;
				continue;
			}
			double nd = (double) num;
			nd = Math.sqrt(nd);
			int a = (int) nd;
			if ( num % 2 == 1) {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			}
		} int i = 0 ; int i = 0 ; i 0 i<n i n i++ i++ i {
			int num = Integer.parseInt(br.readLine());
			if ( num == 2 || num == 3) {
				sum++;
				continue;
			}
			double nd = (double) num;
			nd = Math.sqrt(nd);
			int a = (int) nd;
			if ( num % 2 == 1) {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			}
		} {
			int num = Integer.parseInt(br.readLine());
			if ( num == 2 || num == 3) {
				sum++;
				continue;
			}
			double nd = (double) num;
			nd = Math.sqrt(nd);
			int a = (int) nd;
			if ( num % 2 == 1) {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			}
		} int num = Integer.parseInt(br.readLine()); num Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if ( num == 2 || num == 3) {
				sum++;
				continue;
			} num == 2 || num == 3 num == 2 num 2 num == 3 num 3 {
				sum++;
				continue;
			} sum++ sum continue; double nd = (double) num; nd (double) num nd = Math.sqrt(nd) nd Math.sqrt(nd) Math.sqrt Math nd int a = (int) nd; a (int) nd if ( num % 2 == 1) {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			} num % 2 == 1 num % 2 num 2 1 {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			} for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				} int j = 2; int j = 2; j 2 j<=a j a j++ j++ j {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				} {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				} if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					} num%j == 0 num%j num j 0 {
						break;
					} break; if( j == a){
						sum++;
					} j == a j a {
						sum++;
					} sum++ sum System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.io.*;
import java.util.Arrays;
import java.util.Scanner;

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 sum = 0;
		for (int i = 0 ; i<n ; i++ ) {
			int num = Integer.parseInt(br.readLine());
			if ( num == 2 || num == 3) {
				sum++;
				continue;
			}
			double nd = (double) num;
			nd = Math.sqrt(nd);
			int a = (int) nd;
			if ( num % 2 == 1) {
				for (int j = 2; j<=a ; j++ ) {
					if ( num%j == 0 ) {
						break;
					}else if( j == a){
						sum++;
					}

				}
			}
		}
		System.out.println(sum);
	}
}