import java.util.Scanner;

public class Main {

	public static boolean is_prime(int n) {
		int square_root = (int)Math.sqrt(n);
		for (int i = square_root; i > 1; i--) {
			if (n % i == 0) {
				return false;
			}
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int num_of_primes = 0;
		for (int i = 0; i < n; i++) {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		}
		System.out.println(num_of_primes);
	}
}
 import java.util.Scanner; Scanner java.util public class Main {

	public static boolean is_prime(int n) {
		int square_root = (int)Math.sqrt(n);
		for (int i = square_root; i > 1; i--) {
			if (n % i == 0) {
				return false;
			}
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int num_of_primes = 0;
		for (int i = 0; i < n; i++) {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		}
		System.out.println(num_of_primes);
	}
} Main public static boolean is_prime(int n) {
		int square_root = (int)Math.sqrt(n);
		for (int i = square_root; i > 1; i--) {
			if (n % i == 0) {
				return false;
			}
		}
		return true;
	} is_prime {
		int square_root = (int)Math.sqrt(n);
		for (int i = square_root; i > 1; i--) {
			if (n % i == 0) {
				return false;
			}
		}
		return true;
	} int square_root = (int)Math.sqrt(n); square_root (int)Math.sqrt(n) Math.sqrt Math n for (int i = square_root; i > 1; i--) {
			if (n % i == 0) {
				return false;
			}
		} int i = square_root; int i = square_root; i square_root i > 1 i 1 i-- i-- i {
			if (n % i == 0) {
				return false;
			}
		} {
			if (n % i == 0) {
				return false;
			}
		} if (n % i == 0) {
				return false;
			} n % i == 0 n % i n i 0 {
				return false;
			} return false; false return true; true int n n public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int num_of_primes = 0;
		for (int i = 0; i < n; i++) {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		}
		System.out.println(num_of_primes);
	} main {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int num_of_primes = 0;
		for (int i = 0; i < n; i++) {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		}
		System.out.println(num_of_primes);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int num_of_primes = 0; num_of_primes 0 for (int i = 0; i < n; i++) {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		} {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		} int m = s.nextInt(); m s.nextInt() s.nextInt s if (is_prime(m))
				num_of_primes++; is_prime(m) is_prime m num_of_primes++ num_of_primes System.out.println(num_of_primes) System.out.println System.out System System.out num_of_primes String[] args args public class Main {

	public static boolean is_prime(int n) {
		int square_root = (int)Math.sqrt(n);
		for (int i = square_root; i > 1; i--) {
			if (n % i == 0) {
				return false;
			}
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int num_of_primes = 0;
		for (int i = 0; i < n; i++) {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		}
		System.out.println(num_of_primes);
	}
} public class Main {

	public static boolean is_prime(int n) {
		int square_root = (int)Math.sqrt(n);
		for (int i = square_root; i > 1; i--) {
			if (n % i == 0) {
				return false;
			}
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int num_of_primes = 0;
		for (int i = 0; i < n; i++) {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		}
		System.out.println(num_of_primes);
	}
} Main
import java.util.Scanner;

public class Main {

	public static boolean is_prime(int n) {
		int square_root = (int)Math.sqrt(n);
		for (int i = square_root; i > 1; i--) {
			if (n % i == 0) {
				return false;
			}
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int num_of_primes = 0;
		for (int i = 0; i < n; i++) {
			int m = s.nextInt();
			if (is_prime(m))
				num_of_primes++;
		}
		System.out.println(num_of_primes);
	}
}

