import java.util.Scanner;
 
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		int max = 100000001;
		boolean [] sosuu = new boolean [max];
 		
		sosuulist(sosuu, max);
 		
 		syuturyoku(sosuu);
		
	}
 
	private static void sosuulist(boolean [] sosuu, int max) {
		for (int i = 1; i <= max - 1; i++) {
			sosuu[i] = true;
		}
		sosuu[0] = false;
		sosuu[1] = false;
 
		for (int i = 2; i <= Math.sqrt(max); i++) {
			if (sosuu[i] == true) {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			}
 
		}
	}
	
	private static void syuturyoku(boolean [] sosuu) {
		int [] n = new int [10000];
		int count = 0;
		
		Scanner cin = new Scanner (System.in);
		int x = cin.nextInt();
 
		for (int i = 0; i < x; i++) {
			n[i] = cin.nextInt();
			if (sosuu[n[i]] == true) count++;
		}
 
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		int max = 100000001;
		boolean [] sosuu = new boolean [max];
 		
		sosuulist(sosuu, max);
 		
 		syuturyoku(sosuu);
		
	}
 
	private static void sosuulist(boolean [] sosuu, int max) {
		for (int i = 1; i <= max - 1; i++) {
			sosuu[i] = true;
		}
		sosuu[0] = false;
		sosuu[1] = false;
 
		for (int i = 2; i <= Math.sqrt(max); i++) {
			if (sosuu[i] == true) {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			}
 
		}
	}
	
	private static void syuturyoku(boolean [] sosuu) {
		int [] n = new int [10000];
		int count = 0;
		
		Scanner cin = new Scanner (System.in);
		int x = cin.nextInt();
 
		for (int i = 0; i < x; i++) {
			n[i] = cin.nextInt();
			if (sosuu[n[i]] == true) count++;
		}
 
		System.out.println(count);
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		int max = 100000001;
		boolean [] sosuu = new boolean [max];
 		
		sosuulist(sosuu, max);
 		
 		syuturyoku(sosuu);
		
	} main {
		int max = 100000001;
		boolean [] sosuu = new boolean [max];
 		
		sosuulist(sosuu, max);
 		
 		syuturyoku(sosuu);
		
	} int max = 100000001; max 100000001 boolean [] sosuu = new boolean [max]; sosuu new boolean [max] max sosuulist(sosuu, max) sosuulist sosuu max syuturyoku(sosuu) syuturyoku sosuu String[] args args private static void sosuulist(boolean [] sosuu, int max) {
		for (int i = 1; i <= max - 1; i++) {
			sosuu[i] = true;
		}
		sosuu[0] = false;
		sosuu[1] = false;
 
		for (int i = 2; i <= Math.sqrt(max); i++) {
			if (sosuu[i] == true) {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			}
 
		}
	} sosuulist {
		for (int i = 1; i <= max - 1; i++) {
			sosuu[i] = true;
		}
		sosuu[0] = false;
		sosuu[1] = false;
 
		for (int i = 2; i <= Math.sqrt(max); i++) {
			if (sosuu[i] == true) {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			}
 
		}
	} for (int i = 1; i <= max - 1; i++) {
			sosuu[i] = true;
		} int i = 1; int i = 1; i 1 i <= max - 1 i max - 1 max 1 i++ i++ i {
			sosuu[i] = true;
		} {
			sosuu[i] = true;
		} sosuu[i] = true sosuu[i] sosuu i true sosuu[0] = false sosuu[0] sosuu 0 false sosuu[1] = false sosuu[1] sosuu 1 false for (int i = 2; i <= Math.sqrt(max); i++) {
			if (sosuu[i] == true) {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			}
 
		} int i = 2; int i = 2; i 2 i <= Math.sqrt(max) i Math.sqrt(max) Math.sqrt Math max i++ i++ i {
			if (sosuu[i] == true) {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			}
 
		} {
			if (sosuu[i] == true) {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			}
 
		} if (sosuu[i] == true) {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			} sosuu[i] == true sosuu[i] sosuu i true {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			} for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				} int j = i + i; int j = i + i; j i + i i i j <= max - 1 j max - 1 max 1 j += i j += i j i {
					sosuu[j] = false;
				} {
					sosuu[j] = false;
				} sosuu[j] = false sosuu[j] sosuu j false boolean [] sosuu sosuu int max max private static void syuturyoku(boolean [] sosuu) {
		int [] n = new int [10000];
		int count = 0;
		
		Scanner cin = new Scanner (System.in);
		int x = cin.nextInt();
 
		for (int i = 0; i < x; i++) {
			n[i] = cin.nextInt();
			if (sosuu[n[i]] == true) count++;
		}
 
		System.out.println(count);
	} syuturyoku {
		int [] n = new int [10000];
		int count = 0;
		
		Scanner cin = new Scanner (System.in);
		int x = cin.nextInt();
 
		for (int i = 0; i < x; i++) {
			n[i] = cin.nextInt();
			if (sosuu[n[i]] == true) count++;
		}
 
		System.out.println(count);
	} int [] n = new int [10000]; n new int [10000] 10000 int count = 0; count 0 Scanner cin = new Scanner (System.in); cin new Scanner (System.in) int x = cin.nextInt(); x cin.nextInt() cin.nextInt cin for (int i = 0; i < x; i++) {
			n[i] = cin.nextInt();
			if (sosuu[n[i]] == true) count++;
		} int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
			n[i] = cin.nextInt();
			if (sosuu[n[i]] == true) count++;
		} {
			n[i] = cin.nextInt();
			if (sosuu[n[i]] == true) count++;
		} n[i] = cin.nextInt() n[i] n i cin.nextInt() cin.nextInt cin if (sosuu[n[i]] == true) count++; sosuu[n[i]] == true sosuu[n[i]] sosuu n[i] n i true count++ count System.out.println(count) System.out.println System.out System System.out count boolean [] sosuu sosuu
import java.util.Scanner;
 
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		int max = 100000001;
		boolean [] sosuu = new boolean [max];
 		
		sosuulist(sosuu, max);
 		
 		syuturyoku(sosuu);
		
	}
 
	private static void sosuulist(boolean [] sosuu, int max) {
		for (int i = 1; i <= max - 1; i++) {
			sosuu[i] = true;
		}
		sosuu[0] = false;
		sosuu[1] = false;
 
		for (int i = 2; i <= Math.sqrt(max); i++) {
			if (sosuu[i] == true) {
				for (int j = i + i; j <= max - 1; j += i) {
					sosuu[j] = false;
				}
			}
 
		}
	}
	
	private static void syuturyoku(boolean [] sosuu) {
		int [] n = new int [10000];
		int count = 0;
		
		Scanner cin = new Scanner (System.in);
		int x = cin.nextInt();
 
		for (int i = 0; i < x; i++) {
			n[i] = cin.nextInt();
			if (sosuu[n[i]] == true) count++;
		}
 
		System.out.println(count);
	}
}