
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		int sum = 0;
		for (int i = 0; i < x; i++) {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		}
		System.out.println(sum);
	}

	public static boolean isPrime(int i) {
		if (i == 2)
			return true;
		if (i % 2 == 0)
			return false;
		if (i < 8)
			return true;
		if (i % 3 == 0)
			return false;
		int k = 5;
		while (k * k <= i) {
			if (i % k == 0)
				return false;
			if (i % (k + 2) == 0)
				return false;
			k += 6;
		}
		return true;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		int sum = 0;
		for (int i = 0; i < x; i++) {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		}
		System.out.println(sum);
	}

	public static boolean isPrime(int i) {
		if (i == 2)
			return true;
		if (i % 2 == 0)
			return false;
		if (i < 8)
			return true;
		if (i % 3 == 0)
			return false;
		int k = 5;
		while (k * k <= i) {
			if (i % k == 0)
				return false;
			if (i % (k + 2) == 0)
				return false;
			k += 6;
		}
		return true;
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		int sum = 0;
		for (int i = 0; i < x; i++) {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		}
		System.out.println(sum);
	} main {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		int sum = 0;
		for (int i = 0; i < x; i++) {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		}
		System.out.println(sum);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int sum = 0; sum 0 for (int i = 0; i < x; i++) {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		} int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		} {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		} if (isPrime(scanner.nextInt())) {
				sum++;
			} isPrime(scanner.nextInt()) isPrime scanner.nextInt() scanner.nextInt scanner {
				sum++;
			} sum++ sum System.out.println(sum) System.out.println System.out System System.out sum String[] args args public static boolean isPrime(int i) {
		if (i == 2)
			return true;
		if (i % 2 == 0)
			return false;
		if (i < 8)
			return true;
		if (i % 3 == 0)
			return false;
		int k = 5;
		while (k * k <= i) {
			if (i % k == 0)
				return false;
			if (i % (k + 2) == 0)
				return false;
			k += 6;
		}
		return true;
	} isPrime {
		if (i == 2)
			return true;
		if (i % 2 == 0)
			return false;
		if (i < 8)
			return true;
		if (i % 3 == 0)
			return false;
		int k = 5;
		while (k * k <= i) {
			if (i % k == 0)
				return false;
			if (i % (k + 2) == 0)
				return false;
			k += 6;
		}
		return true;
	} if (i == 2)
			return true; i == 2 i 2 return true; true if (i % 2 == 0)
			return false; i % 2 == 0 i % 2 i 2 0 return false; false if (i < 8)
			return true; i < 8 i 8 return true; true if (i % 3 == 0)
			return false; i % 3 == 0 i % 3 i 3 0 return false; false int k = 5; k 5 while (k * k <= i) {
			if (i % k == 0)
				return false;
			if (i % (k + 2) == 0)
				return false;
			k += 6;
		} k * k <= i k * k k k i {
			if (i % k == 0)
				return false;
			if (i % (k + 2) == 0)
				return false;
			k += 6;
		} if (i % k == 0)
				return false; i % k == 0 i % k i k 0 return false; false if (i % (k + 2) == 0)
				return false; i % (k + 2) == 0 i % (k + 2) i (k + 2) k 2 0 return false; false k += 6 k 6 return true; true int i i public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		int sum = 0;
		for (int i = 0; i < x; i++) {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		}
		System.out.println(sum);
	}

	public static boolean isPrime(int i) {
		if (i == 2)
			return true;
		if (i % 2 == 0)
			return false;
		if (i < 8)
			return true;
		if (i % 3 == 0)
			return false;
		int k = 5;
		while (k * k <= i) {
			if (i % k == 0)
				return false;
			if (i % (k + 2) == 0)
				return false;
			k += 6;
		}
		return true;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		int sum = 0;
		for (int i = 0; i < x; i++) {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		}
		System.out.println(sum);
	}

	public static boolean isPrime(int i) {
		if (i == 2)
			return true;
		if (i % 2 == 0)
			return false;
		if (i < 8)
			return true;
		if (i % 3 == 0)
			return false;
		int k = 5;
		while (k * k <= i) {
			if (i % k == 0)
				return false;
			if (i % (k + 2) == 0)
				return false;
			k += 6;
		}
		return true;
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		int sum = 0;
		for (int i = 0; i < x; i++) {
			if (isPrime(scanner.nextInt())) {
				sum++;
			}
		}
		System.out.println(sum);
	}

	public static boolean isPrime(int i) {
		if (i == 2)
			return true;
		if (i % 2 == 0)
			return false;
		if (i < 8)
			return true;
		if (i % 3 == 0)
			return false;
		int k = 5;
		while (k * k <= i) {
			if (i % k == 0)
				return false;
			if (i % (k + 2) == 0)
				return false;
			k += 6;
		}
		return true;
	}
}