import java.util.Scanner;

/**
 * ?´???°????????°?????????????????????
 * @author moritahokuto
 *
 */
public class Main {

	public static void main(String[] args) {
		int count = 0;
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		for (int i = 0; i < size; i++) {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		}
		System.out.println(count);
	}
	static boolean isPrime(int num) {
		if (num == 2) {
			return true;
		}
		if (num < 2 || num % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(num)) {
			if (num % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		int count = 0;
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		for (int i = 0; i < size; i++) {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		}
		System.out.println(count);
	}
	static boolean isPrime(int num) {
		if (num == 2) {
			return true;
		}
		if (num < 2 || num % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(num)) {
			if (num % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	}
} Main public static void main(String[] args) {
		int count = 0;
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		for (int i = 0; i < size; i++) {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		}
		System.out.println(count);
	} main {
		int count = 0;
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		for (int i = 0; i < size; i++) {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		}
		System.out.println(count);
	} int count = 0; count 0 Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int size = scanner.nextInt(); size scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < size; i++) {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < size i size i++ i++ i {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		} {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		} if (isPrime(scanner.nextInt())) {
				count++;
			} isPrime(scanner.nextInt()) isPrime scanner.nextInt() scanner.nextInt scanner {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args static boolean isPrime(int num) {
		if (num == 2) {
			return true;
		}
		if (num < 2 || num % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(num)) {
			if (num % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	} isPrime {
		if (num == 2) {
			return true;
		}
		if (num < 2 || num % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(num)) {
			if (num % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	} if (num == 2) {
			return true;
		} num == 2 num 2 {
			return true;
		} return true; true if (num < 2 || num % 2 == 0) {
			return false;
		} num < 2 || num % 2 == 0 num < 2 num 2 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 = i + 2;
		} i <= Math.sqrt(num) i Math.sqrt(num) Math.sqrt Math num {
			if (num % i == 0) {
				return false;
			}
			i = i + 2;
		} if (num % i == 0) {
				return false;
			} num % i == 0 num % i num i 0 {
				return false;
			} return false; false i = i + 2 i i + 2 i 2 return true; true int num num public class Main {

	public static void main(String[] args) {
		int count = 0;
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		for (int i = 0; i < size; i++) {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		}
		System.out.println(count);
	}
	static boolean isPrime(int num) {
		if (num == 2) {
			return true;
		}
		if (num < 2 || num % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(num)) {
			if (num % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	}
} public class Main {

	public static void main(String[] args) {
		int count = 0;
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		for (int i = 0; i < size; i++) {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		}
		System.out.println(count);
	}
	static boolean isPrime(int num) {
		if (num == 2) {
			return true;
		}
		if (num < 2 || num % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(num)) {
			if (num % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	}
} Main
import java.util.Scanner;

/**
 * ?´???°????????°?????????????????????
 * @author moritahokuto
 *
 */
public class Main {

	public static void main(String[] args) {
		int count = 0;
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		for (int i = 0; i < size; i++) {
			if (isPrime(scanner.nextInt())) {
				count++;
			}
		}
		System.out.println(count);
	}
	static boolean isPrime(int num) {
		if (num == 2) {
			return true;
		}
		if (num < 2 || num % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(num)) {
			if (num % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	}
}