import java.util.Scanner;

public class Main {
	
	/*public static Boolean primenumber(int n) {
		Boolean result = true;
		int mid = (int)(n^(1/2));
		if (n > 2) {
			for (int i = 2; i < mid; i++) {
				if (n%i == 0) {
					result = false;
					break;
				}
			}
		}
		return result;
	}*/
	
	public static Boolean primenumber(int n) {
		if (n <= 3) {
			return n > 1;
		}
		else if (n%2 == 0 || n%3 == 0) {
			return false;
		}
		int i = 5;
		while (i*i <= n) {
			if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			}
			i = i + 6;
		}
		return true;
	}
	
	public static int numberprimes(int[] P) {
		int counter = 0;
		for (int p : P) {
			if (primenumber(p)) {
				counter++;
			}
		}
		return counter;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numintegers = in.nextInt();
		int[] P = new int[numintegers];
		int index = 0;
		while (index < numintegers) {
			int num = in.nextInt();
			P[index] = num;
			index++;
		}
		in.close();
		int result = numberprimes(P);
		System.out.println(result);
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	
	/*public static Boolean primenumber(int n) {
		Boolean result = true;
		int mid = (int)(n^(1/2));
		if (n > 2) {
			for (int i = 2; i < mid; i++) {
				if (n%i == 0) {
					result = false;
					break;
				}
			}
		}
		return result;
	}*/
	
	public static Boolean primenumber(int n) {
		if (n <= 3) {
			return n > 1;
		}
		else if (n%2 == 0 || n%3 == 0) {
			return false;
		}
		int i = 5;
		while (i*i <= n) {
			if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			}
			i = i + 6;
		}
		return true;
	}
	
	public static int numberprimes(int[] P) {
		int counter = 0;
		for (int p : P) {
			if (primenumber(p)) {
				counter++;
			}
		}
		return counter;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numintegers = in.nextInt();
		int[] P = new int[numintegers];
		int index = 0;
		while (index < numintegers) {
			int num = in.nextInt();
			P[index] = num;
			index++;
		}
		in.close();
		int result = numberprimes(P);
		System.out.println(result);
	}
} Main public static Boolean primenumber(int n) {
		if (n <= 3) {
			return n > 1;
		}
		else if (n%2 == 0 || n%3 == 0) {
			return false;
		}
		int i = 5;
		while (i*i <= n) {
			if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			}
			i = i + 6;
		}
		return true;
	} primenumber {
		if (n <= 3) {
			return n > 1;
		}
		else if (n%2 == 0 || n%3 == 0) {
			return false;
		}
		int i = 5;
		while (i*i <= n) {
			if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			}
			i = i + 6;
		}
		return true;
	} if (n <= 3) {
			return n > 1;
		}
		else if (n%2 == 0 || n%3 == 0) {
			return false;
		} n <= 3 n 3 {
			return n > 1;
		} return n > 1; n > 1 n 1 if (n%2 == 0 || n%3 == 0) {
			return false;
		} n%2 == 0 || n%3 == 0 n%2 == 0 n%2 n 2 0 n%3 == 0 n%3 n 3 0 {
			return false;
		} return false; false int i = 5; i 5 while (i*i <= n) {
			if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			}
			i = i + 6;
		} i*i <= n i*i i i n {
			if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			}
			i = i + 6;
		} if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			} n%i == 0 || n%(i + 2) == 0 n%i == 0 n%i n i 0 n%(i + 2) == 0 n%(i + 2) n (i + 2) i 2 0 {
				return false;
			} return false; false i = i + 6 i i + 6 i 6 return true; true int n n public static int numberprimes(int[] P) {
		int counter = 0;
		for (int p : P) {
			if (primenumber(p)) {
				counter++;
			}
		}
		return counter;
	} numberprimes {
		int counter = 0;
		for (int p : P) {
			if (primenumber(p)) {
				counter++;
			}
		}
		return counter;
	} int counter = 0; counter 0 for (int p : P) {
			if (primenumber(p)) {
				counter++;
			}
		} int p P {
			if (primenumber(p)) {
				counter++;
			}
		} {
			if (primenumber(p)) {
				counter++;
			}
		} if (primenumber(p)) {
				counter++;
			} primenumber(p) primenumber p {
				counter++;
			} counter++ counter return counter; counter int[] P P public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numintegers = in.nextInt();
		int[] P = new int[numintegers];
		int index = 0;
		while (index < numintegers) {
			int num = in.nextInt();
			P[index] = num;
			index++;
		}
		in.close();
		int result = numberprimes(P);
		System.out.println(result);
	} main {
		Scanner in = new Scanner(System.in);
		int numintegers = in.nextInt();
		int[] P = new int[numintegers];
		int index = 0;
		while (index < numintegers) {
			int num = in.nextInt();
			P[index] = num;
			index++;
		}
		in.close();
		int result = numberprimes(P);
		System.out.println(result);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int numintegers = in.nextInt(); numintegers in.nextInt() in.nextInt in int[] P = new int[numintegers]; P new int[numintegers] numintegers int index = 0; index 0 while (index < numintegers) {
			int num = in.nextInt();
			P[index] = num;
			index++;
		} index < numintegers index numintegers {
			int num = in.nextInt();
			P[index] = num;
			index++;
		} int num = in.nextInt(); num in.nextInt() in.nextInt in P[index] = num P[index] P index num index++ index in.close() in.close in int result = numberprimes(P); result numberprimes(P) numberprimes P System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	
	/*public static Boolean primenumber(int n) {
		Boolean result = true;
		int mid = (int)(n^(1/2));
		if (n > 2) {
			for (int i = 2; i < mid; i++) {
				if (n%i == 0) {
					result = false;
					break;
				}
			}
		}
		return result;
	}*/
	
	public static Boolean primenumber(int n) {
		if (n <= 3) {
			return n > 1;
		}
		else if (n%2 == 0 || n%3 == 0) {
			return false;
		}
		int i = 5;
		while (i*i <= n) {
			if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			}
			i = i + 6;
		}
		return true;
	}
	
	public static int numberprimes(int[] P) {
		int counter = 0;
		for (int p : P) {
			if (primenumber(p)) {
				counter++;
			}
		}
		return counter;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numintegers = in.nextInt();
		int[] P = new int[numintegers];
		int index = 0;
		while (index < numintegers) {
			int num = in.nextInt();
			P[index] = num;
			index++;
		}
		in.close();
		int result = numberprimes(P);
		System.out.println(result);
	}
} public class Main {
	
	/*public static Boolean primenumber(int n) {
		Boolean result = true;
		int mid = (int)(n^(1/2));
		if (n > 2) {
			for (int i = 2; i < mid; i++) {
				if (n%i == 0) {
					result = false;
					break;
				}
			}
		}
		return result;
	}*/
	
	public static Boolean primenumber(int n) {
		if (n <= 3) {
			return n > 1;
		}
		else if (n%2 == 0 || n%3 == 0) {
			return false;
		}
		int i = 5;
		while (i*i <= n) {
			if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			}
			i = i + 6;
		}
		return true;
	}
	
	public static int numberprimes(int[] P) {
		int counter = 0;
		for (int p : P) {
			if (primenumber(p)) {
				counter++;
			}
		}
		return counter;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numintegers = in.nextInt();
		int[] P = new int[numintegers];
		int index = 0;
		while (index < numintegers) {
			int num = in.nextInt();
			P[index] = num;
			index++;
		}
		in.close();
		int result = numberprimes(P);
		System.out.println(result);
	}
} Main
import java.util.Scanner;

public class Main {
	
	/*public static Boolean primenumber(int n) {
		Boolean result = true;
		int mid = (int)(n^(1/2));
		if (n > 2) {
			for (int i = 2; i < mid; i++) {
				if (n%i == 0) {
					result = false;
					break;
				}
			}
		}
		return result;
	}*/
	
	public static Boolean primenumber(int n) {
		if (n <= 3) {
			return n > 1;
		}
		else if (n%2 == 0 || n%3 == 0) {
			return false;
		}
		int i = 5;
		while (i*i <= n) {
			if (n%i == 0 || n%(i + 2) == 0) {
				return false;
			}
			i = i + 6;
		}
		return true;
	}
	
	public static int numberprimes(int[] P) {
		int counter = 0;
		for (int p : P) {
			if (primenumber(p)) {
				counter++;
			}
		}
		return counter;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int numintegers = in.nextInt();
		int[] P = new int[numintegers];
		int index = 0;
		while (index < numintegers) {
			int num = in.nextInt();
			P[index] = num;
			index++;
		}
		in.close();
		int result = numberprimes(P);
		System.out.println(result);
	}
}

