import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] numArray = new int[Integer.parseInt(br.readLine())];
		for (int i = 0; i < numArray.length; i++) {
			numArray[i] = Integer.parseInt(br.readLine());
		}

		// ?卒???属???????????????
		int count = 0;
		boolean isPrime = false;
		for (int i = 0; i < numArray.length; i++) {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		}

		System.out.println(count);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] numArray = new int[Integer.parseInt(br.readLine())];
		for (int i = 0; i < numArray.length; i++) {
			numArray[i] = Integer.parseInt(br.readLine());
		}

		// ?卒???属???????????????
		int count = 0;
		boolean isPrime = false;
		for (int i = 0; i < numArray.length; i++) {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		}

		System.out.println(count);
	}
} Main public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] numArray = new int[Integer.parseInt(br.readLine())];
		for (int i = 0; i < numArray.length; i++) {
			numArray[i] = Integer.parseInt(br.readLine());
		}

		// ?卒???属???????????????
		int count = 0;
		boolean isPrime = false;
		for (int i = 0; i < numArray.length; i++) {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		}

		System.out.println(count);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] numArray = new int[Integer.parseInt(br.readLine())];
		for (int i = 0; i < numArray.length; i++) {
			numArray[i] = Integer.parseInt(br.readLine());
		}

		// ?卒???属???????????????
		int count = 0;
		boolean isPrime = false;
		for (int i = 0; i < numArray.length; i++) {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		}

		System.out.println(count);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int[] numArray = new int[Integer.parseInt(br.readLine())]; numArray new int[Integer.parseInt(br.readLine())] Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for (int i = 0; i < numArray.length; i++) {
			numArray[i] = Integer.parseInt(br.readLine());
		} int i = 0; int i = 0; i 0 i < numArray.length i numArray.length numArray numArray.length i++ i++ i {
			numArray[i] = Integer.parseInt(br.readLine());
		} {
			numArray[i] = Integer.parseInt(br.readLine());
		} numArray[i] = Integer.parseInt(br.readLine()) numArray[i] numArray i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int count = 0; count 0 boolean isPrime = false; isPrime false for (int i = 0; i < numArray.length; i++) {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < numArray.length i numArray.length numArray numArray.length i++ i++ i {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		} {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		} if (numArray[i] == 1) {
				continue;
			} numArray[i] == 1 numArray[i] numArray i 1 {
				continue;
			} continue; if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			} numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7 numArray[i] == 5 numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7 numArray[i] == 2 numArray[i] numArray i 2 numArray[i] == 3 numArray[i] numArray i 3 numArray[i] == 5 numArray[i] numArray i 5 numArray[i] == 7 numArray[i] numArray i 7 {
				count++;
				continue;
			} count++ count continue; for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			} int j = 2; int j = 2; j 2 j * j <= numArray[i] j * j j j numArray[i] numArray i j++ j++ j {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			} {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			} if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				} (numArray[i] % j) == 0 (numArray[i] % j) numArray[i] numArray i j 0 {
					isPrime = false;
					break;
				} isPrime = false isPrime false break; isPrime = true isPrime true if (isPrime) {
				count++;
			} isPrime {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] numArray = new int[Integer.parseInt(br.readLine())];
		for (int i = 0; i < numArray.length; i++) {
			numArray[i] = Integer.parseInt(br.readLine());
		}

		// ?卒???属???????????????
		int count = 0;
		boolean isPrime = false;
		for (int i = 0; i < numArray.length; i++) {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		}

		System.out.println(count);
	}
} public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] numArray = new int[Integer.parseInt(br.readLine())];
		for (int i = 0; i < numArray.length; i++) {
			numArray[i] = Integer.parseInt(br.readLine());
		}

		// ?卒???属???????????????
		int count = 0;
		boolean isPrime = false;
		for (int i = 0; i < numArray.length; i++) {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		}

		System.out.println(count);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int[] numArray = new int[Integer.parseInt(br.readLine())];
		for (int i = 0; i < numArray.length; i++) {
			numArray[i] = Integer.parseInt(br.readLine());
		}

		// ?卒???属???????????????
		int count = 0;
		boolean isPrime = false;
		for (int i = 0; i < numArray.length; i++) {
			if (numArray[i] == 1) {
				continue;
			}
			if (numArray[i] == 2 || numArray[i] == 3 || numArray[i] == 5
					|| numArray[i] == 7) {
				count++;
				continue;
			}
			for (int j = 2; j * j <= numArray[i]; j++) {
				if ((numArray[i] % j) == 0) {
					isPrime = false;
					break;
				}
				isPrime = true;
			}
			if (isPrime) {
				count++;
			}
		}

		System.out.println(count);
	}
}