import java.util.Scanner;


public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int prime = 0;
		for (int i = 0; i < n; i++) {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		}
		System.out.println(prime);
	}
	boolean is_prime(int p) {
		if (p == 2) return true;
		if (p < 2 || (p&1) == 0) return false;
		int i = 3;
		while (i <= Math.sqrt(p)) {
			if (p % i == 0) return false;
			i = i + 2;
		}
		return true;
	}
	public static void main(String[] args) {
		new Main().run();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int prime = 0;
		for (int i = 0; i < n; i++) {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		}
		System.out.println(prime);
	}
	boolean is_prime(int p) {
		if (p == 2) return true;
		if (p < 2 || (p&1) == 0) return false;
		int i = 3;
		while (i <= Math.sqrt(p)) {
			if (p % i == 0) return false;
			i = i + 2;
		}
		return true;
	}
	public static void main(String[] args) {
		new Main().run();
	}
} Main void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int prime = 0;
		for (int i = 0; i < n; i++) {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		}
		System.out.println(prime);
	} run {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int prime = 0;
		for (int i = 0; i < n; i++) {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		}
		System.out.println(prime);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int prime = 0; prime 0 for (int i = 0; i < n; i++) {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		} {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		} int p = scan.nextInt(); p scan.nextInt() scan.nextInt scan if(is_prime(p)) prime += 1; is_prime(p) is_prime p prime += 1 prime 1 System.out.println(prime) System.out.println System.out System System.out prime boolean is_prime(int p) {
		if (p == 2) return true;
		if (p < 2 || (p&1) == 0) return false;
		int i = 3;
		while (i <= Math.sqrt(p)) {
			if (p % i == 0) return false;
			i = i + 2;
		}
		return true;
	} is_prime {
		if (p == 2) return true;
		if (p < 2 || (p&1) == 0) return false;
		int i = 3;
		while (i <= Math.sqrt(p)) {
			if (p % i == 0) return false;
			i = i + 2;
		}
		return true;
	} if (p == 2) return true; p == 2 p 2 return true; true if (p < 2 || (p&1) == 0) return false; p < 2 || (p&1) == 0 p < 2 p 2 (p&1) == 0 (p&1) p 1 0 return false; false int i = 3; i 3 while (i <= Math.sqrt(p)) {
			if (p % i == 0) return false;
			i = i + 2;
		} i <= Math.sqrt(p) i Math.sqrt(p) Math.sqrt Math p {
			if (p % i == 0) return false;
			i = i + 2;
		} if (p % i == 0) return false; p % i == 0 p % i p i 0 return false; false i = i + 2 i i + 2 i 2 return true; true int p p public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int prime = 0;
		for (int i = 0; i < n; i++) {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		}
		System.out.println(prime);
	}
	boolean is_prime(int p) {
		if (p == 2) return true;
		if (p < 2 || (p&1) == 0) return false;
		int i = 3;
		while (i <= Math.sqrt(p)) {
			if (p % i == 0) return false;
			i = i + 2;
		}
		return true;
	}
	public static void main(String[] args) {
		new Main().run();
	}
} public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int prime = 0;
		for (int i = 0; i < n; i++) {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		}
		System.out.println(prime);
	}
	boolean is_prime(int p) {
		if (p == 2) return true;
		if (p < 2 || (p&1) == 0) return false;
		int i = 3;
		while (i <= Math.sqrt(p)) {
			if (p % i == 0) return false;
			i = i + 2;
		}
		return true;
	}
	public static void main(String[] args) {
		new Main().run();
	}
} Main
import java.util.Scanner;


public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int prime = 0;
		for (int i = 0; i < n; i++) {
			int p = scan.nextInt();
			if(is_prime(p)) prime += 1;
		}
		System.out.println(prime);
	}
	boolean is_prime(int p) {
		if (p == 2) return true;
		if (p < 2 || (p&1) == 0) return false;
		int i = 3;
		while (i <= Math.sqrt(p)) {
			if (p % i == 0) return false;
			i = i + 2;
		}
		return true;
	}
	public static void main(String[] args) {
		new Main().run();
	}
}