import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int primeNum = 0;

		for(int i = 0; i < n; i++) {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		}
		System.out.println(primeNum);
	}

	static boolean isPrime(int num) {

		if(num == 2) {
			return true;
		}

		if(num % 2 == 0) {
			return false;
		}

		int i = 3;
		while(i <= Math.sqrt(num)) {

			if(num % i == 0) {
				return false;
			}

			i += 2;
		}

		return true;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws Exception {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int primeNum = 0;

		for(int i = 0; i < n; i++) {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		}
		System.out.println(primeNum);
	}

	static boolean isPrime(int num) {

		if(num == 2) {
			return true;
		}

		if(num % 2 == 0) {
			return false;
		}

		int i = 3;
		while(i <= Math.sqrt(num)) {

			if(num % i == 0) {
				return false;
			}

			i += 2;
		}

		return true;
	}
} Main public static void main(String[] args) throws Exception {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int primeNum = 0;

		for(int i = 0; i < n; i++) {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		}
		System.out.println(primeNum);
	} main {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int primeNum = 0;

		for(int i = 0; i < n; i++) {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		}
		System.out.println(primeNum);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int primeNum = 0; primeNum 0 for(int i = 0; i < n; i++) {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		} {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		} int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if(isPrime(num)) {
				primeNum++;
			} isPrime(num) isPrime num {
				primeNum++;
			} primeNum++ primeNum System.out.println(primeNum) System.out.println System.out System System.out primeNum String[] args args static boolean isPrime(int num) {

		if(num == 2) {
			return true;
		}

		if(num % 2 == 0) {
			return false;
		}

		int i = 3;
		while(i <= Math.sqrt(num)) {

			if(num % i == 0) {
				return false;
			}

			i += 2;
		}

		return true;
	} isPrime {

		if(num == 2) {
			return true;
		}

		if(num % 2 == 0) {
			return false;
		}

		int i = 3;
		while(i <= Math.sqrt(num)) {

			if(num % i == 0) {
				return false;
			}

			i += 2;
		}

		return true;
	} if(num == 2) {
			return true;
		} num == 2 num 2 {
			return true;
		} return true; true if(num % 2 == 0) {
			return false;
		} num % 2 == 0 num % 2 num 2 0 {
			return false;
		} return false; false int i = 3; i 3 while(i <= Math.sqrt(num)) {

			if(num % i == 0) {
				return false;
			}

			i += 2;
		} i <= Math.sqrt(num) i Math.sqrt(num) Math.sqrt Math num {

			if(num % i == 0) {
				return false;
			}

			i += 2;
		} if(num % i == 0) {
				return false;
			} num % i == 0 num % i num i 0 {
				return false;
			} return false; false i += 2 i 2 return true; true int num num public class Main {

	public static void main(String[] args) throws Exception {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int primeNum = 0;

		for(int i = 0; i < n; i++) {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		}
		System.out.println(primeNum);
	}

	static boolean isPrime(int num) {

		if(num == 2) {
			return true;
		}

		if(num % 2 == 0) {
			return false;
		}

		int i = 3;
		while(i <= Math.sqrt(num)) {

			if(num % i == 0) {
				return false;
			}

			i += 2;
		}

		return true;
	}
} public class Main {

	public static void main(String[] args) throws Exception {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int primeNum = 0;

		for(int i = 0; i < n; i++) {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		}
		System.out.println(primeNum);
	}

	static boolean isPrime(int num) {

		if(num == 2) {
			return true;
		}

		if(num % 2 == 0) {
			return false;
		}

		int i = 3;
		while(i <= Math.sqrt(num)) {

			if(num % i == 0) {
				return false;
			}

			i += 2;
		}

		return true;
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int primeNum = 0;

		for(int i = 0; i < n; i++) {

			int num = sc.nextInt();

			if(isPrime(num)) {
				primeNum++;
			}
		}
		System.out.println(primeNum);
	}

	static boolean isPrime(int num) {

		if(num == 2) {
			return true;
		}

		if(num % 2 == 0) {
			return false;
		}

		int i = 3;
		while(i <= Math.sqrt(num)) {

			if(num % i == 0) {
				return false;
			}

			i += 2;
		}

		return true;
	}
}
