import java.text.ParseException;
import java.util.Scanner;

public class Main {

	public static void main(String[] arges) throws ParseException {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();

		int v1 = Integer.parseInt(line);
		int[] vs = new int[v1];
		for (int i = 0; i < v1; i++) {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		}
		int sosuuc = 0;
		for (int i = 0; i < v1; i++) {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		}
		System.out.println(sosuuc);
	}
} import java.text.ParseException; ParseException java.text import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] arges) throws ParseException {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();

		int v1 = Integer.parseInt(line);
		int[] vs = new int[v1];
		for (int i = 0; i < v1; i++) {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		}
		int sosuuc = 0;
		for (int i = 0; i < v1; i++) {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		}
		System.out.println(sosuuc);
	}
} Main public static void main(String[] arges) throws ParseException {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();

		int v1 = Integer.parseInt(line);
		int[] vs = new int[v1];
		for (int i = 0; i < v1; i++) {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		}
		int sosuuc = 0;
		for (int i = 0; i < v1; i++) {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		}
		System.out.println(sosuuc);
	} main {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();

		int v1 = Integer.parseInt(line);
		int[] vs = new int[v1];
		for (int i = 0; i < v1; i++) {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		}
		int sosuuc = 0;
		for (int i = 0; i < v1; i++) {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		}
		System.out.println(sosuuc);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc int v1 = Integer.parseInt(line); v1 Integer.parseInt(line) Integer.parseInt Integer line int[] vs = new int[v1]; vs new int[v1] v1 for (int i = 0; i < v1; i++) {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		} int i = 0; int i = 0; i 0 i < v1 i v1 i++ i++ i {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		} {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		} String line2 = sc.nextLine(); line2 sc.nextLine() sc.nextLine sc vs[i] = Integer.parseInt(line2) vs[i] vs i Integer.parseInt(line2) Integer.parseInt Integer line2 int sosuuc = 0; sosuuc 0 for (int i = 0; i < v1; i++) {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		} int i = 0; int i = 0; i 0 i < v1 i v1 i++ i++ i {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		} {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		} int count = 0; count 0 if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} vs[i] <= 10 vs[i] vs i 10 {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				} int j = 2; int j = 2; j 2 j <= vs[i] /2 j vs[i] /2 vs[i] vs i 2 j++ j++ j {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				} {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				} if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					} vs[i] % j == 0 vs[i] % j vs[i] vs i j 0 {
						count++;
						if (count == 1) {
							break;
						}
					} count++ count if (count == 1) {
							break;
						} count == 1 count 1 {
							break;
						} break; {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				} int j = 2; int j = 2; j 2 j <= Math.sqrt(vs[i]) j Math.sqrt(vs[i]) Math.sqrt Math vs[i] vs i j++ j++ j {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				} {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				} if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					} vs[i] % j == 0 vs[i] % j vs[i] vs i j 0 {
						count++;
						if (count == 1) {
							break;
						}
					} count++ count if (count == 1) {
							break;
						} count == 1 count 1 {
							break;
						} break; if (count == 0) {
				sosuuc++;
			} count == 0 count 0 {
				sosuuc++;
			} sosuuc++ sosuuc System.out.println(sosuuc) System.out.println System.out System System.out sosuuc String[] arges arges public class Main {

	public static void main(String[] arges) throws ParseException {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();

		int v1 = Integer.parseInt(line);
		int[] vs = new int[v1];
		for (int i = 0; i < v1; i++) {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		}
		int sosuuc = 0;
		for (int i = 0; i < v1; i++) {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		}
		System.out.println(sosuuc);
	}
} public class Main {

	public static void main(String[] arges) throws ParseException {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();

		int v1 = Integer.parseInt(line);
		int[] vs = new int[v1];
		for (int i = 0; i < v1; i++) {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		}
		int sosuuc = 0;
		for (int i = 0; i < v1; i++) {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		}
		System.out.println(sosuuc);
	}
} Main
import java.text.ParseException;
import java.util.Scanner;

public class Main {

	public static void main(String[] arges) throws ParseException {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();

		int v1 = Integer.parseInt(line);
		int[] vs = new int[v1];
		for (int i = 0; i < v1; i++) {
			String line2 = sc.nextLine();
			vs[i] = Integer.parseInt(line2);
		}
		int sosuuc = 0;
		for (int i = 0; i < v1; i++) {
			int count = 0;
			if (vs[i] <= 10) {

				for (int j = 2; j <= vs[i] /2; j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			} else {
				for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
					if (vs[i] % j == 0) {
						count++;
						if (count == 1) {
							break;
						}
					}
				}

			}
			if (count == 0) {
				sosuuc++;
			}
		}
		System.out.println(sosuuc);
	}
}