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

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int number;
		short numberOfTimes, checkTime = 0, count = 0;
		numberOfTimes = Short.parseShort(in.readLine());
		while (true) {
			if (checkTime == numberOfTimes) {
				break;
			}
			number = Integer.parseInt(in.readLine());
			for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			}
			checkTime++;
		}
		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 in = new BufferedReader(new InputStreamReader(System.in));
		int number;
		short numberOfTimes, checkTime = 0, count = 0;
		numberOfTimes = Short.parseShort(in.readLine());
		while (true) {
			if (checkTime == numberOfTimes) {
				break;
			}
			number = Integer.parseInt(in.readLine());
			for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			}
			checkTime++;
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int number;
		short numberOfTimes, checkTime = 0, count = 0;
		numberOfTimes = Short.parseShort(in.readLine());
		while (true) {
			if (checkTime == numberOfTimes) {
				break;
			}
			number = Integer.parseInt(in.readLine());
			for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			}
			checkTime++;
		}
		System.out.println(count);
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int number;
		short numberOfTimes, checkTime = 0, count = 0;
		numberOfTimes = Short.parseShort(in.readLine());
		while (true) {
			if (checkTime == numberOfTimes) {
				break;
			}
			number = Integer.parseInt(in.readLine());
			for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			}
			checkTime++;
		}
		System.out.println(count);
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int number; number short numberOfTimes numberOfTimes checkTime = 0 checkTime 0 count = 0; count 0 numberOfTimes = Short.parseShort(in.readLine()) numberOfTimes Short.parseShort(in.readLine()) Short.parseShort Short in.readLine() in.readLine in while (true) {
			if (checkTime == numberOfTimes) {
				break;
			}
			number = Integer.parseInt(in.readLine());
			for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			}
			checkTime++;
		} true {
			if (checkTime == numberOfTimes) {
				break;
			}
			number = Integer.parseInt(in.readLine());
			for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			}
			checkTime++;
		} if (checkTime == numberOfTimes) {
				break;
			} checkTime == numberOfTimes checkTime numberOfTimes {
				break;
			} break; number = Integer.parseInt(in.readLine()) number Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			} int x = 2; int x = 2; x 2 x <= number x number x++ x++ x {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			} {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			} if (x > Math.sqrt(number)) {
					count++;
					break;
				} x > Math.sqrt(number) x Math.sqrt(number) Math.sqrt Math number {
					count++;
					break;
				} count++ count break; if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				} number % x == 0 number % x number x 0 {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				} if (number != x) {
						break;
					} else if (number == x) {
						count++;
					} number != x number x {
						break;
					} break; if (number == x) {
						count++;
					} number == x number x {
						count++;
					} count++ count checkTime++ checkTime 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 in = new BufferedReader(new InputStreamReader(System.in));
		int number;
		short numberOfTimes, checkTime = 0, count = 0;
		numberOfTimes = Short.parseShort(in.readLine());
		while (true) {
			if (checkTime == numberOfTimes) {
				break;
			}
			number = Integer.parseInt(in.readLine());
			for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			}
			checkTime++;
		}
		System.out.println(count);
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int number;
		short numberOfTimes, checkTime = 0, count = 0;
		numberOfTimes = Short.parseShort(in.readLine());
		while (true) {
			if (checkTime == numberOfTimes) {
				break;
			}
			number = Integer.parseInt(in.readLine());
			for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			}
			checkTime++;
		}
		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 in = new BufferedReader(new InputStreamReader(System.in));
		int number;
		short numberOfTimes, checkTime = 0, count = 0;
		numberOfTimes = Short.parseShort(in.readLine());
		while (true) {
			if (checkTime == numberOfTimes) {
				break;
			}
			number = Integer.parseInt(in.readLine());
			for (int x = 2; x <= number; x++) {
				if (x > Math.sqrt(number)) {
					count++;
					break;
				}
				if (number % x == 0) {
					if (number != x) {
						break;
					} else if (number == x) {
						count++;
					}
				}
			}
			checkTime++;
		}
		System.out.println(count);
	}
}