import java.util.*;

public class Main {
	/*
	boolean[] furui() {
		boolean[] tab = new boolean[100000001];
		tab[0] = tab[1] = true;
		for (int i = 2; i <= tab.length/2; i++) {
			if (tab[i]) continue;
			for (int j = i + i; j < tab.length; j+=i) {
				tab[j] = true;
			}
		}
		return tab;
	}*/

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

	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] ary = new int[n];
		for (int i = 0; i < n; i++) {
			ary[i] = scan.nextInt();
		}
		//boolean[] table = furui();
		int count = 0;
		for (int i = 0; i < ary.length; i++) {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		}
		System.out.println(count);
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

}
 import java.util.*; util.* java public class Main {
	/*
	boolean[] furui() {
		boolean[] tab = new boolean[100000001];
		tab[0] = tab[1] = true;
		for (int i = 2; i <= tab.length/2; i++) {
			if (tab[i]) continue;
			for (int j = i + i; j < tab.length; j+=i) {
				tab[j] = true;
			}
		}
		return tab;
	}*/

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

	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] ary = new int[n];
		for (int i = 0; i < n; i++) {
			ary[i] = scan.nextInt();
		}
		//boolean[] table = furui();
		int count = 0;
		for (int i = 0; i < ary.length; i++) {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		}
		System.out.println(count);
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

} Main boolean isPrime(int x) {
		if (x==2) return true;
		if (x < 2 || x % 2 == 0) return false;
		for (int i = 3; i <= Math.sqrt(x); i += 2) {
			if (x % i == 0) return false;
		}
		return true;
	} isPrime {
		if (x==2) return true;
		if (x < 2 || x % 2 == 0) return false;
		for (int i = 3; i <= Math.sqrt(x); i += 2) {
			if (x % i == 0) return false;
		}
		return true;
	} if (x==2) return true; x==2 x 2 return true; true if (x < 2 || x % 2 == 0) return false; x < 2 || x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return false; false for (int i = 3; i <= Math.sqrt(x); i += 2) {
			if (x % i == 0) return false;
		} int i = 3; int i = 3; i 3 i <= Math.sqrt(x) i Math.sqrt(x) Math.sqrt Math x i += 2 i += 2 i 2 {
			if (x % i == 0) return false;
		} {
			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 void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] ary = new int[n];
		for (int i = 0; i < n; i++) {
			ary[i] = scan.nextInt();
		}
		//boolean[] table = furui();
		int count = 0;
		for (int i = 0; i < ary.length; i++) {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		}
		System.out.println(count);
	} run {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] ary = new int[n];
		for (int i = 0; i < n; i++) {
			ary[i] = scan.nextInt();
		}
		//boolean[] table = furui();
		int count = 0;
		for (int i = 0; i < ary.length; i++) {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		}
		System.out.println(count);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] ary = new int[n]; ary new int[n] n for (int i = 0; i < n; i++) {
			ary[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			ary[i] = scan.nextInt();
		} {
			ary[i] = scan.nextInt();
		} ary[i] = scan.nextInt() ary[i] ary i scan.nextInt() scan.nextInt scan int count = 0; count 0 for (int i = 0; i < ary.length; i++) {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < ary.length i ary.length ary ary.length i++ i++ i {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		} {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		} if (isPrime(ary[i])) {
				count++;
			} isPrime(ary[i]) isPrime ary[i] ary i {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	} main {
		// TODO Auto-generated method stub
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	/*
	boolean[] furui() {
		boolean[] tab = new boolean[100000001];
		tab[0] = tab[1] = true;
		for (int i = 2; i <= tab.length/2; i++) {
			if (tab[i]) continue;
			for (int j = i + i; j < tab.length; j+=i) {
				tab[j] = true;
			}
		}
		return tab;
	}*/

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

	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] ary = new int[n];
		for (int i = 0; i < n; i++) {
			ary[i] = scan.nextInt();
		}
		//boolean[] table = furui();
		int count = 0;
		for (int i = 0; i < ary.length; i++) {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		}
		System.out.println(count);
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

} public class Main {
	/*
	boolean[] furui() {
		boolean[] tab = new boolean[100000001];
		tab[0] = tab[1] = true;
		for (int i = 2; i <= tab.length/2; i++) {
			if (tab[i]) continue;
			for (int j = i + i; j < tab.length; j+=i) {
				tab[j] = true;
			}
		}
		return tab;
	}*/

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

	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] ary = new int[n];
		for (int i = 0; i < n; i++) {
			ary[i] = scan.nextInt();
		}
		//boolean[] table = furui();
		int count = 0;
		for (int i = 0; i < ary.length; i++) {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		}
		System.out.println(count);
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

} Main
import java.util.*;

public class Main {
	/*
	boolean[] furui() {
		boolean[] tab = new boolean[100000001];
		tab[0] = tab[1] = true;
		for (int i = 2; i <= tab.length/2; i++) {
			if (tab[i]) continue;
			for (int j = i + i; j < tab.length; j+=i) {
				tab[j] = true;
			}
		}
		return tab;
	}*/

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

	void run() {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] ary = new int[n];
		for (int i = 0; i < n; i++) {
			ary[i] = scan.nextInt();
		}
		//boolean[] table = furui();
		int count = 0;
		for (int i = 0; i < ary.length; i++) {
			/*
			if (table[ary[i]] == false) {
				count++;
				System.out.println(ary[i]);
			}*/
			if (isPrime(ary[i])) {
				count++;
			}
		}
		System.out.println(count);
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

}

