import java.util.Scanner;

class Main {
	int count;
	public static void main(String[] args) {
		Main pmClass = new Main();

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] array = new int[n];
		for(int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
			pmClass.calc(array[i]);
		}
		System.out.println(pmClass.count);
	}
	public void calc(int a){
		boolean pm = true;
		if(a <= 1 || a % 2 == 0) {
			pm = false;
		}
		if(a == 2) {
			pm = true;
		}
		for(int i = 3; i <= Math.sqrt(a); i += 2) {
			if (a % i == 0) {
				pm = false;
				break;
			}
		}
		if (pm) count++;
	}
} import java.util.Scanner; Scanner java.util class Main {
	int count;
	public static void main(String[] args) {
		Main pmClass = new Main();

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] array = new int[n];
		for(int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
			pmClass.calc(array[i]);
		}
		System.out.println(pmClass.count);
	}
	public void calc(int a){
		boolean pm = true;
		if(a <= 1 || a % 2 == 0) {
			pm = false;
		}
		if(a == 2) {
			pm = true;
		}
		for(int i = 3; i <= Math.sqrt(a); i += 2) {
			if (a % i == 0) {
				pm = false;
				break;
			}
		}
		if (pm) count++;
	}
} Main int count; count public static void main(String[] args) {
		Main pmClass = new Main();

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] array = new int[n];
		for(int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
			pmClass.calc(array[i]);
		}
		System.out.println(pmClass.count);
	} main {
		Main pmClass = new Main();

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] array = new int[n];
		for(int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
			pmClass.calc(array[i]);
		}
		System.out.println(pmClass.count);
	} Main pmClass = new Main(); pmClass new Main() Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] array = new int[n]; array new int[n] n for(int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
			pmClass.calc(array[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			array[i] = sc.nextInt();
			pmClass.calc(array[i]);
		} {
			array[i] = sc.nextInt();
			pmClass.calc(array[i]);
		} array[i] = sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc pmClass.calc(array[i]) pmClass.calc pmClass array[i] array i System.out.println(pmClass.count) System.out.println System.out System System.out pmClass.count pmClass pmClass.count String[] args args public void calc(int a){
		boolean pm = true;
		if(a <= 1 || a % 2 == 0) {
			pm = false;
		}
		if(a == 2) {
			pm = true;
		}
		for(int i = 3; i <= Math.sqrt(a); i += 2) {
			if (a % i == 0) {
				pm = false;
				break;
			}
		}
		if (pm) count++;
	} calc {
		boolean pm = true;
		if(a <= 1 || a % 2 == 0) {
			pm = false;
		}
		if(a == 2) {
			pm = true;
		}
		for(int i = 3; i <= Math.sqrt(a); i += 2) {
			if (a % i == 0) {
				pm = false;
				break;
			}
		}
		if (pm) count++;
	} boolean pm = true; pm true if(a <= 1 || a % 2 == 0) {
			pm = false;
		} a <= 1 || a % 2 == 0 a <= 1 a 1 a % 2 == 0 a % 2 a 2 0 {
			pm = false;
		} pm = false pm false if(a == 2) {
			pm = true;
		} a == 2 a 2 {
			pm = true;
		} pm = true pm true for(int i = 3; i <= Math.sqrt(a); i += 2) {
			if (a % i == 0) {
				pm = false;
				break;
			}
		} int i = 3; int i = 3; i 3 i <= Math.sqrt(a) i Math.sqrt(a) Math.sqrt Math a i += 2 i += 2 i 2 {
			if (a % i == 0) {
				pm = false;
				break;
			}
		} {
			if (a % i == 0) {
				pm = false;
				break;
			}
		} if (a % i == 0) {
				pm = false;
				break;
			} a % i == 0 a % i a i 0 {
				pm = false;
				break;
			} pm = false pm false break; if (pm) count++; pm count++ count int a a
import java.util.Scanner;

class Main {
	int count;
	public static void main(String[] args) {
		Main pmClass = new Main();

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] array = new int[n];
		for(int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
			pmClass.calc(array[i]);
		}
		System.out.println(pmClass.count);
	}
	public void calc(int a){
		boolean pm = true;
		if(a <= 1 || a % 2 == 0) {
			pm = false;
		}
		if(a == 2) {
			pm = true;
		}
		for(int i = 3; i <= Math.sqrt(a); i += 2) {
			if (a % i == 0) {
				pm = false;
				break;
			}
		}
		if (pm) count++;
	}
}
