import java.util.Scanner;

public class Main {

	static boolean[] prime;

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

		prime = new boolean[100000001];
		int count = 0;

		for (int i=2; i<=10000; i++) {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		}

		int n = sc.nextInt();
		for (int i=0; i<n; i++) {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

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

	static boolean[] prime;

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

		prime = new boolean[100000001];
		int count = 0;

		for (int i=2; i<=10000; i++) {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		}

		int n = sc.nextInt();
		for (int i=0; i<n; i++) {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

} Main static boolean[] prime; prime public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		prime = new boolean[100000001];
		int count = 0;

		for (int i=2; i<=10000; i++) {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		}

		int n = sc.nextInt();
		for (int i=0; i<n; i++) {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		prime = new boolean[100000001];
		int count = 0;

		for (int i=2; i<=10000; i++) {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		}

		int n = sc.nextInt();
		for (int i=0; i<n; i++) {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) prime = new boolean[100000001] prime new boolean[100000001] 100000001 int count = 0; count 0 for (int i=2; i<=10000; i++) {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		} int i=2; int i=2; i 2 i<=10000 i 10000 i++ i++ i {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		} {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		} if (prime[i]) continue; prime[i] prime i continue; for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			} int j=i*2; int j=i*2; j i*2 i 2 j<=100000000 j 100000000 j+=i j+=i j i {
				prime[j] = true;
			} {
				prime[j] = true;
			} prime[j] = true prime[j] prime j true int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i=0; i<n; i++) {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		} {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		} int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if (!prime[num]) {
				count++;
			} !prime[num] prime[num] prime num {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args public class Main {

	static boolean[] prime;

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

		prime = new boolean[100000001];
		int count = 0;

		for (int i=2; i<=10000; i++) {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		}

		int n = sc.nextInt();
		for (int i=0; i<n; i++) {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

} public class Main {

	static boolean[] prime;

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

		prime = new boolean[100000001];
		int count = 0;

		for (int i=2; i<=10000; i++) {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		}

		int n = sc.nextInt();
		for (int i=0; i<n; i++) {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {

	static boolean[] prime;

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

		prime = new boolean[100000001];
		int count = 0;

		for (int i=2; i<=10000; i++) {
			if (prime[i]) continue;
			for (int j=i*2; j<=100000000; j+=i) {
				prime[j] = true;
			}
		}

		int n = sc.nextInt();
		for (int i=0; i<n; i++) {
			int num = sc.nextInt();
			if (!prime[num]) {
				count++;
			}
		}

		System.out.println(count);

		sc.close();
	}

}