import java.util.Scanner;

public class Main {

	public static boolean isPrime(int n) {
		boolean out = true;
		int last = (int) (Math.floor(Math.sqrt(n)));
		for (int j = 3; j <= last; j += 2) {
			if (n % j == 0) {
				return false;
			}
		}
		return out;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int aCount = in.nextInt();
		int count = 0;
		int next;

		for (int i = 0; i < aCount; i++) {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		}
		System.out.println(count);
		in.close();
	}
}
 import java.util.Scanner; Scanner java.util public class Main {

	public static boolean isPrime(int n) {
		boolean out = true;
		int last = (int) (Math.floor(Math.sqrt(n)));
		for (int j = 3; j <= last; j += 2) {
			if (n % j == 0) {
				return false;
			}
		}
		return out;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int aCount = in.nextInt();
		int count = 0;
		int next;

		for (int i = 0; i < aCount; i++) {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		}
		System.out.println(count);
		in.close();
	}
} Main public static boolean isPrime(int n) {
		boolean out = true;
		int last = (int) (Math.floor(Math.sqrt(n)));
		for (int j = 3; j <= last; j += 2) {
			if (n % j == 0) {
				return false;
			}
		}
		return out;
	} isPrime {
		boolean out = true;
		int last = (int) (Math.floor(Math.sqrt(n)));
		for (int j = 3; j <= last; j += 2) {
			if (n % j == 0) {
				return false;
			}
		}
		return out;
	} boolean out = true; out true int last = (int) (Math.floor(Math.sqrt(n))); last (int) (Math.floor(Math.sqrt(n))) Math.floor Math Math.sqrt(n) Math.sqrt Math n for (int j = 3; j <= last; j += 2) {
			if (n % j == 0) {
				return false;
			}
		} int j = 3; int j = 3; j 3 j <= last j last j += 2 j += 2 j 2 {
			if (n % j == 0) {
				return false;
			}
		} {
			if (n % j == 0) {
				return false;
			}
		} if (n % j == 0) {
				return false;
			} n % j == 0 n % j n j 0 {
				return false;
			} return false; false return out; out int n n public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int aCount = in.nextInt();
		int count = 0;
		int next;

		for (int i = 0; i < aCount; i++) {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		}
		System.out.println(count);
		in.close();
	} main {
		Scanner in = new Scanner(System.in);

		int aCount = in.nextInt();
		int count = 0;
		int next;

		for (int i = 0; i < aCount; i++) {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		}
		System.out.println(count);
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int aCount = in.nextInt(); aCount in.nextInt() in.nextInt in int count = 0; count 0 int next; next for (int i = 0; i < aCount; i++) {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		} int i = 0; int i = 0; i 0 i < aCount i aCount i++ i++ i {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		} {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		} next = in.nextInt() next in.nextInt() in.nextInt in if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			} next == 2 next 2 {
				count++;
			} count++ count if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			} next % 2 != 0 next % 2 next 2 0 {
				if (isPrime(next)) {
					count++;
				}
			} if (isPrime(next)) {
					count++;
				} isPrime(next) isPrime next {
					count++;
				} count++ count System.out.println(count) System.out.println System.out System System.out count in.close() in.close in String[] args args public class Main {

	public static boolean isPrime(int n) {
		boolean out = true;
		int last = (int) (Math.floor(Math.sqrt(n)));
		for (int j = 3; j <= last; j += 2) {
			if (n % j == 0) {
				return false;
			}
		}
		return out;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int aCount = in.nextInt();
		int count = 0;
		int next;

		for (int i = 0; i < aCount; i++) {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		}
		System.out.println(count);
		in.close();
	}
} public class Main {

	public static boolean isPrime(int n) {
		boolean out = true;
		int last = (int) (Math.floor(Math.sqrt(n)));
		for (int j = 3; j <= last; j += 2) {
			if (n % j == 0) {
				return false;
			}
		}
		return out;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int aCount = in.nextInt();
		int count = 0;
		int next;

		for (int i = 0; i < aCount; i++) {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		}
		System.out.println(count);
		in.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static boolean isPrime(int n) {
		boolean out = true;
		int last = (int) (Math.floor(Math.sqrt(n)));
		for (int j = 3; j <= last; j += 2) {
			if (n % j == 0) {
				return false;
			}
		}
		return out;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int aCount = in.nextInt();
		int count = 0;
		int next;

		for (int i = 0; i < aCount; i++) {
			next = in.nextInt();
			if (next == 2) {
				count++;
			} else if (next % 2 != 0) {
				if (isPrime(next)) {
					count++;
				}
			}
		}
		System.out.println(count);
		in.close();
	}
}

