import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		int sosu=0;
		boolean it;

		for(int i=0; i<count; i++) {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		}
		System.out.println(sosu);
	}
	public static boolean isprime(int num) {
		if (num < 2) return false;
		else if (num == 2) return true;
		else if (num % 2 == 0) return false;

		double sqrtNum = Math.sqrt(num);
		for (int i = 3; i <= sqrtNum; i += 2)
		{
			if (num % i == 0)
			{

				return false;
			}
		}

		return true;

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		int sosu=0;
		boolean it;

		for(int i=0; i<count; i++) {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		}
		System.out.println(sosu);
	}
	public static boolean isprime(int num) {
		if (num < 2) return false;
		else if (num == 2) return true;
		else if (num % 2 == 0) return false;

		double sqrtNum = Math.sqrt(num);
		for (int i = 3; i <= sqrtNum; i += 2)
		{
			if (num % i == 0)
			{

				return false;
			}
		}

		return true;

	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		int sosu=0;
		boolean it;

		for(int i=0; i<count; i++) {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		}
		System.out.println(sosu);
	} main {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		int sosu=0;
		boolean it;

		for(int i=0; i<count; i++) {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		}
		System.out.println(sosu);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int count = sc.nextInt(); count sc.nextInt() sc.nextInt sc int sosu=0; sosu 0 boolean it; it for(int i=0; i<count; i++) {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		} int i=0; int i=0; i 0 i<count i count i++ i++ i {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		} {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		} int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc it=isprime(y) it isprime(y) isprime y if(it) {
				sosu += 1;
			} it {
				sosu += 1;
			} sosu += 1 sosu 1 System.out.println(sosu) System.out.println System.out System System.out sosu String[] args args public static boolean isprime(int num) {
		if (num < 2) return false;
		else if (num == 2) return true;
		else if (num % 2 == 0) return false;

		double sqrtNum = Math.sqrt(num);
		for (int i = 3; i <= sqrtNum; i += 2)
		{
			if (num % i == 0)
			{

				return false;
			}
		}

		return true;

	} isprime {
		if (num < 2) return false;
		else if (num == 2) return true;
		else if (num % 2 == 0) return false;

		double sqrtNum = Math.sqrt(num);
		for (int i = 3; i <= sqrtNum; i += 2)
		{
			if (num % i == 0)
			{

				return false;
			}
		}

		return true;

	} if (num < 2) return false;
		else if (num == 2) return true;
		else if (num % 2 == 0) return false; num < 2 num 2 return false; false if (num == 2) return true;
		else if (num % 2 == 0) return false; num == 2 num 2 return true; true if (num % 2 == 0) return false; num % 2 == 0 num % 2 num 2 0 return false; false double sqrtNum = Math.sqrt(num); sqrtNum Math.sqrt(num) Math.sqrt Math num for (int i = 3; i <= sqrtNum; i += 2)
		{
			if (num % i == 0)
			{

				return false;
			}
		} int i = 3; int i = 3; i 3 i <= sqrtNum i sqrtNum i += 2 i += 2 i 2 {
			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;
			} return false; false return true; true int num num public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		int sosu=0;
		boolean it;

		for(int i=0; i<count; i++) {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		}
		System.out.println(sosu);
	}
	public static boolean isprime(int num) {
		if (num < 2) return false;
		else if (num == 2) return true;
		else if (num % 2 == 0) return false;

		double sqrtNum = Math.sqrt(num);
		for (int i = 3; i <= sqrtNum; i += 2)
		{
			if (num % i == 0)
			{

				return false;
			}
		}

		return true;

	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		int sosu=0;
		boolean it;

		for(int i=0; i<count; i++) {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		}
		System.out.println(sosu);
	}
	public static boolean isprime(int num) {
		if (num < 2) return false;
		else if (num == 2) return true;
		else if (num % 2 == 0) return false;

		double sqrtNum = Math.sqrt(num);
		for (int i = 3; i <= sqrtNum; i += 2)
		{
			if (num % i == 0)
			{

				return false;
			}
		}

		return true;

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		int sosu=0;
		boolean it;

		for(int i=0; i<count; i++) {
			int y = sc.nextInt();
			it=isprime(y);
			if(it) {
				sosu += 1;
			}
		}
		System.out.println(sosu);
	}
	public static boolean isprime(int num) {
		if (num < 2) return false;
		else if (num == 2) return true;
		else if (num % 2 == 0) return false;

		double sqrtNum = Math.sqrt(num);
		for (int i = 3; i <= sqrtNum; i += 2)
		{
			if (num % i == 0)
			{

				return false;
			}
		}

		return true;

	}
}
