import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int count = 0;
		int y = 0;
		for (int j = 0; j < n; j++) {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int count = 0;
		int y = 0;
		for (int j = 0; j < n; j++) {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int count = 0;
		int y = 0;
		for (int j = 0; j < n; j++) {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		}
		System.out.println(count);
	} main {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int count = 0;
		int y = 0;
		for (int j = 0; j < n; j++) {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		}
		System.out.println(count);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 int y = 0; y 0 for (int j = 0; j < n; j++) {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		} {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		} int z = 0; z 0 int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			} x == 2 x 2 {
				count += 1;
			} count += 1 count 1 if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			} x % 2 == 1 x % 2 x 2 1 {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			} double xx = Math.sqrt((double)x); xx Math.sqrt((double)x) Math.sqrt Math (double)x for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				} int i = (int)xx; int i = (int)xx; i (int)xx i >= 3 i 3 i-- i-- i {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				} {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				} y = x % i y x % i x i if (y == 0) {
						z += 1;
						break;
					} y == 0 y 0 {
						z += 1;
						break;
					} z += 1 z 1 break; if (z == 0) {
					count += 1;
				} z == 0 z 0 {
					count += 1;
				} count += 1 count 1 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) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int count = 0;
		int y = 0;
		for (int j = 0; j < n; j++) {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		}
		System.out.println(count);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int count = 0;
		int y = 0;
		for (int j = 0; j < n; j++) {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		}
		System.out.println(count);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int count = 0;
		int y = 0;
		for (int j = 0; j < n; j++) {
			int z = 0;
			int x = scanner.nextInt();
			if (x == 2) {
				count += 1;
			} else if (x % 2 == 1) {
				double xx = Math.sqrt((double)x);
				for (int i = (int)xx; i >= 3; i--) {
					y = x % i;
					if (y == 0) {
						z += 1;
						break;
					}
				}
				if (z == 0) {
					count += 1;
				}
			}
		}
		System.out.println(count);
	}
}
