import java.util.Scanner;

public class Main {

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

		int n = scan.nextInt();
		int[] e = new int[n];
		for (int i = 0; i < n; i++)
			e[i] = scan.nextInt();

		int r = 0;
		for (int i = 0; i < n; i++)
			if (isPrime(e[i]))
				r++;
		System.out.println(r);

		scan.close();
		System.exit(0);
	}

	private static boolean isPrime(int x) {
		double max=Math.sqrt(x);
		for (int i = 2; i <= max; i++)
			if (x % i == 0)
				return false;
		return true;
	}
} import java.util.Scanner; Scanner java.util public class Main {

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

		int n = scan.nextInt();
		int[] e = new int[n];
		for (int i = 0; i < n; i++)
			e[i] = scan.nextInt();

		int r = 0;
		for (int i = 0; i < n; i++)
			if (isPrime(e[i]))
				r++;
		System.out.println(r);

		scan.close();
		System.exit(0);
	}

	private static boolean isPrime(int x) {
		double max=Math.sqrt(x);
		for (int i = 2; i <= max; i++)
			if (x % i == 0)
				return false;
		return true;
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] e = new int[n];
		for (int i = 0; i < n; i++)
			e[i] = scan.nextInt();

		int r = 0;
		for (int i = 0; i < n; i++)
			if (isPrime(e[i]))
				r++;
		System.out.println(r);

		scan.close();
		System.exit(0);
	} main {
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] e = new int[n];
		for (int i = 0; i < n; i++)
			e[i] = scan.nextInt();

		int r = 0;
		for (int i = 0; i < n; i++)
			if (isPrime(e[i]))
				r++;
		System.out.println(r);

		scan.close();
		System.exit(0);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] e = new int[n]; e new int[n] n for (int i = 0; i < n; i++)
			e[i] = scan.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i e[i] = scan.nextInt(); e[i] = scan.nextInt() e[i] e i scan.nextInt() scan.nextInt scan int r = 0; r 0 for (int i = 0; i < n; i++)
			if (isPrime(e[i]))
				r++; int i = 0; int i = 0; i 0 i < n i n i++ i++ i if (isPrime(e[i]))
				r++; if (isPrime(e[i]))
				r++; isPrime(e[i]) isPrime e[i] e i r++ r System.out.println(r) System.out.println System.out System System.out r scan.close() scan.close scan System.exit(0) System.exit System 0 String[] args args private static boolean isPrime(int x) {
		double max=Math.sqrt(x);
		for (int i = 2; i <= max; i++)
			if (x % i == 0)
				return false;
		return true;
	} isPrime {
		double max=Math.sqrt(x);
		for (int i = 2; i <= max; i++)
			if (x % i == 0)
				return false;
		return true;
	} double max=Math.sqrt(x); max Math.sqrt(x) Math.sqrt Math x for (int i = 2; i <= max; i++)
			if (x % i == 0)
				return false; int i = 2; int i = 2; i 2 i <= max i max i++ i++ i if (x % i == 0)
				return false; if (x % i == 0)
				return false; x % i == 0 x % i x i 0 return false; false return true; true int x x public class Main {

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

		int n = scan.nextInt();
		int[] e = new int[n];
		for (int i = 0; i < n; i++)
			e[i] = scan.nextInt();

		int r = 0;
		for (int i = 0; i < n; i++)
			if (isPrime(e[i]))
				r++;
		System.out.println(r);

		scan.close();
		System.exit(0);
	}

	private static boolean isPrime(int x) {
		double max=Math.sqrt(x);
		for (int i = 2; i <= max; i++)
			if (x % i == 0)
				return false;
		return true;
	}
} public class Main {

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

		int n = scan.nextInt();
		int[] e = new int[n];
		for (int i = 0; i < n; i++)
			e[i] = scan.nextInt();

		int r = 0;
		for (int i = 0; i < n; i++)
			if (isPrime(e[i]))
				r++;
		System.out.println(r);

		scan.close();
		System.exit(0);
	}

	private static boolean isPrime(int x) {
		double max=Math.sqrt(x);
		for (int i = 2; i <= max; i++)
			if (x % i == 0)
				return false;
		return true;
	}
} Main
import java.util.Scanner;

public class Main {

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

		int n = scan.nextInt();
		int[] e = new int[n];
		for (int i = 0; i < n; i++)
			e[i] = scan.nextInt();

		int r = 0;
		for (int i = 0; i < n; i++)
			if (isPrime(e[i]))
				r++;
		System.out.println(r);

		scan.close();
		System.exit(0);
	}

	private static boolean isPrime(int x) {
		double max=Math.sqrt(x);
		for (int i = 2; i <= max; i++)
			if (x % i == 0)
				return false;
		return true;
	}
}