import java.util.Scanner;

public class Main {

	public static boolean checkPrimeNum(int x) {
		int border = (int)Math.sqrt(x) + 1;

		for(int i = 2; i < border; i++) {
			if(x % i == 0) {
				return false;
			}
		}

		return true;
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int x;
		int count = 0;

		for(int i = 0; i < num; i++) {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		}

		System.out.println(count);

	}
}
 import java.util.Scanner; Scanner java.util public class Main {

	public static boolean checkPrimeNum(int x) {
		int border = (int)Math.sqrt(x) + 1;

		for(int i = 2; i < border; i++) {
			if(x % i == 0) {
				return false;
			}
		}

		return true;
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int x;
		int count = 0;

		for(int i = 0; i < num; i++) {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		}

		System.out.println(count);

	}
} Main public static boolean checkPrimeNum(int x) {
		int border = (int)Math.sqrt(x) + 1;

		for(int i = 2; i < border; i++) {
			if(x % i == 0) {
				return false;
			}
		}

		return true;
	} checkPrimeNum {
		int border = (int)Math.sqrt(x) + 1;

		for(int i = 2; i < border; i++) {
			if(x % i == 0) {
				return false;
			}
		}

		return true;
	} int border = (int)Math.sqrt(x) + 1; border (int)Math.sqrt(x) + 1 (int)Math.sqrt(x) Math.sqrt Math x 1 for(int i = 2; i < border; i++) {
			if(x % i == 0) {
				return false;
			}
		} int i = 2; int i = 2; i 2 i < border i border i++ i++ i {
			if(x % i == 0) {
				return false;
			}
		} {
			if(x % i == 0) {
				return false;
			}
		} if(x % i == 0) {
				return false;
			} x % i == 0 x % i x i 0 {
				return false;
			} return false; false return true; true int x x public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int x;
		int count = 0;

		for(int i = 0; i < num; i++) {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		}

		System.out.println(count);

	} main {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int x;
		int count = 0;

		for(int i = 0; i < num; i++) {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		}

		System.out.println(count);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan int x; x int count = 0; count 0 for(int i = 0; i < num; i++) {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		} {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		} x = scan.nextInt() x scan.nextInt() scan.nextInt scan if(checkPrimeNum(x)) {
				count++;
			} checkPrimeNum(x) checkPrimeNum x {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static boolean checkPrimeNum(int x) {
		int border = (int)Math.sqrt(x) + 1;

		for(int i = 2; i < border; i++) {
			if(x % i == 0) {
				return false;
			}
		}

		return true;
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int x;
		int count = 0;

		for(int i = 0; i < num; i++) {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		}

		System.out.println(count);

	}
} public class Main {

	public static boolean checkPrimeNum(int x) {
		int border = (int)Math.sqrt(x) + 1;

		for(int i = 2; i < border; i++) {
			if(x % i == 0) {
				return false;
			}
		}

		return true;
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int x;
		int count = 0;

		for(int i = 0; i < num; i++) {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		}

		System.out.println(count);

	}
} Main
import java.util.Scanner;

public class Main {

	public static boolean checkPrimeNum(int x) {
		int border = (int)Math.sqrt(x) + 1;

		for(int i = 2; i < border; i++) {
			if(x % i == 0) {
				return false;
			}
		}

		return true;
	}

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int x;
		int count = 0;

		for(int i = 0; i < num; i++) {
			x = scan.nextInt();
			if(checkPrimeNum(x)) {
				count++;
			}
		}

		System.out.println(count);

	}
}

