import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int count = 0;
		for (int i = 0; i < n; i++) {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		}

		System.out.println(count);

	}

	private static boolean isPrime(long num) {

		if (num == 2) return true;
		if (num % 2 == 0) return false;

		for (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {
			if(num % i == 0) return false;
		}
		return true;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int count = 0;
		for (int i = 0; i < n; i++) {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		}

		System.out.println(count);

	}

	private static boolean isPrime(long num) {

		if (num == 2) return true;
		if (num % 2 == 0) return false;

		for (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {
			if(num % i == 0) return false;
		}
		return true;
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int count = 0;
		for (int i = 0; i < n; i++) {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		}

		System.out.println(count);

	} main {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int count = 0;
		for (int i = 0; i < n; i++) {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		}

		System.out.println(count);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i = 0; i < n; i++) {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		} {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		} long num = sc.nextLong(); num sc.nextLong() sc.nextLong sc if(isPrime(num)) count++; isPrime(num) isPrime num count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args private static boolean isPrime(long num) {

		if (num == 2) return true;
		if (num % 2 == 0) return false;

		for (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {
			if(num % i == 0) return false;
		}
		return true;
	} isPrime {

		if (num == 2) return true;
		if (num % 2 == 0) return false;

		for (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {
			if(num % i == 0) return false;
		}
		return true;
	} if (num == 2) return true; num == 2 num 2 return true; true if (num % 2 == 0) return false; num % 2 == 0 num % 2 num 2 0 return false; false for (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {
			if(num % i == 0) return false;
		} int i = 2; int i = 2; i 2 i <= (int)Math.pow(num, 0.5) i (int)Math.pow(num, 0.5) Math.pow Math num 0.5 i++ i++ i {
			if(num % i == 0) return false;
		} {
			if(num % i == 0) return false;
		} if(num % i == 0) return false; num % i == 0 num % i num i 0 return false; false return true; true long num num public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int count = 0;
		for (int i = 0; i < n; i++) {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		}

		System.out.println(count);

	}

	private static boolean isPrime(long num) {

		if (num == 2) return true;
		if (num % 2 == 0) return false;

		for (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {
			if(num % i == 0) return false;
		}
		return true;
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int count = 0;
		for (int i = 0; i < n; i++) {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		}

		System.out.println(count);

	}

	private static boolean isPrime(long num) {

		if (num == 2) return true;
		if (num % 2 == 0) return false;

		for (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {
			if(num % i == 0) return false;
		}
		return true;
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int count = 0;
		for (int i = 0; i < n; i++) {
			long num = sc.nextLong();
			if(isPrime(num)) count++;
		}

		System.out.println(count);

	}

	private static boolean isPrime(long num) {

		if (num == 2) return true;
		if (num % 2 == 0) return false;

		for (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {
			if(num % i == 0) return false;
		}
		return true;
	}
}