import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

//		long[] li = new long[n];
//		for (int i=0; i < n; i++) {
//			li[i] = sc.nextLong();
//		}

		int count = 0;
		for (int i=0; i < n; i++) {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		}

		System.out.println(count);

	}

	static boolean isPrime(int n) {
		if (n < 2) return false;
		else if (n == 2) return true;
		else {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			}
		}
	}

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

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

//		long[] li = new long[n];
//		for (int i=0; i < n; i++) {
//			li[i] = sc.nextLong();
//		}

		int count = 0;
		for (int i=0; i < n; i++) {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		}

		System.out.println(count);

	}

	static boolean isPrime(int n) {
		if (n < 2) return false;
		else if (n == 2) return true;
		else {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			}
		}
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

//		long[] li = new long[n];
//		for (int i=0; i < n; i++) {
//			li[i] = sc.nextLong();
//		}

		int count = 0;
		for (int i=0; i < n; i++) {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		}

		System.out.println(count);

	} main {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

//		long[] li = new long[n];
//		for (int i=0; i < n; i++) {
//			li[i] = sc.nextLong();
//		}

		int count = 0;
		for (int i=0; i < n; i++) {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		}

		System.out.println(count);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i=0; i < n; i++) {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		} int i=0; int i=0; i 0 i < n i n i++ i++ i {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		} {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		} int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc if ( isPrime(x) ) count++; isPrime(x) isPrime x count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args static boolean isPrime(int n) {
		if (n < 2) return false;
		else if (n == 2) return true;
		else {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			}
		}
	} isPrime {
		if (n < 2) return false;
		else if (n == 2) return true;
		else {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			}
		}
	} if (n < 2) return false;
		else if (n == 2) return true;
		else {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			}
		} n < 2 n 2 return false; false if (n == 2) return true;
		else {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			}
		} n == 2 n 2 return true; true {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

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

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			} n % 2 == 0 n % 2 n 2 0 return false; false {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			} int i = 2; i 2 while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				} i*i <= n i*i i i n {
					if (n % i == 0) return false;
					i++;
				} if (n % i == 0) return false; n % i == 0 n % i n i 0 return false; false i++ i return true; true int n n public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

//		long[] li = new long[n];
//		for (int i=0; i < n; i++) {
//			li[i] = sc.nextLong();
//		}

		int count = 0;
		for (int i=0; i < n; i++) {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		}

		System.out.println(count);

	}

	static boolean isPrime(int n) {
		if (n < 2) return false;
		else if (n == 2) return true;
		else {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			}
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

//		long[] li = new long[n];
//		for (int i=0; i < n; i++) {
//			li[i] = sc.nextLong();
//		}

		int count = 0;
		for (int i=0; i < n; i++) {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		}

		System.out.println(count);

	}

	static boolean isPrime(int n) {
		if (n < 2) return false;
		else if (n == 2) return true;
		else {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			}
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

//		long[] li = new long[n];
//		for (int i=0; i < n; i++) {
//			li[i] = sc.nextLong();
//		}

		int count = 0;
		for (int i=0; i < n; i++) {
			int x = sc.nextInt();
			if ( isPrime(x) ) count++;
		}

		System.out.println(count);

	}

	static boolean isPrime(int n) {
		if (n < 2) return false;
		else if (n == 2) return true;
		else {
			if (n % 2 == 0) return false;
			else {

				int i = 2;
				while (i*i <= n) {
					if (n % i == 0) return false;
					i++;
				}
				return true;

			}
		}
	}

}