import java.util.ArrayList;
import java.util.Scanner;
import java.lang.Math;

public class Main {
	public static boolean quo(int n) {
		if((n == 0)||(n == 1)) {
			return false;
		}else{
			for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			}
			
		}
		return true;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int size = Integer.parseInt(sc.nextLine());
		
		int i = 0;
		int[] numbs = new int[size];
		ArrayList<Integer> result = new ArrayList<Integer>();
		while (i<size) {
			numbs[i] = Integer.parseInt( sc.nextLine());
			if(quo(numbs[i])) {
				result.add(numbs[i]);
			}
			i+=1;
		}
		System.out.println(result.size());
	}

}
 import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang public class Main {
	public static boolean quo(int n) {
		if((n == 0)||(n == 1)) {
			return false;
		}else{
			for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			}
			
		}
		return true;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int size = Integer.parseInt(sc.nextLine());
		
		int i = 0;
		int[] numbs = new int[size];
		ArrayList<Integer> result = new ArrayList<Integer>();
		while (i<size) {
			numbs[i] = Integer.parseInt( sc.nextLine());
			if(quo(numbs[i])) {
				result.add(numbs[i]);
			}
			i+=1;
		}
		System.out.println(result.size());
	}

} Main public static boolean quo(int n) {
		if((n == 0)||(n == 1)) {
			return false;
		}else{
			for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			}
			
		}
		return true;
	} quo {
		if((n == 0)||(n == 1)) {
			return false;
		}else{
			for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			}
			
		}
		return true;
	} if((n == 0)||(n == 1)) {
			return false;
		}else{
			for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			}
			
		} (n == 0)||(n == 1) (n == 0) n 0 (n == 1) n 1 {
			return false;
		} return false; false {
			for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			}
			
		} for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			} int i = 2; int i = 2; i 2 i<= Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i+=1 i+=1 i 1 {
				if(n%i == 0) {
					return false;
				}
			} {
				if(n%i == 0) {
					return false;
				}
			} if(n%i == 0) {
					return false;
				} n%i == 0 n%i n i 0 {
					return false;
				} return false; false return true; true int n n public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int size = Integer.parseInt(sc.nextLine());
		
		int i = 0;
		int[] numbs = new int[size];
		ArrayList<Integer> result = new ArrayList<Integer>();
		while (i<size) {
			numbs[i] = Integer.parseInt( sc.nextLine());
			if(quo(numbs[i])) {
				result.add(numbs[i]);
			}
			i+=1;
		}
		System.out.println(result.size());
	} main {
		Scanner sc = new Scanner(System.in);
		int size = Integer.parseInt(sc.nextLine());
		
		int i = 0;
		int[] numbs = new int[size];
		ArrayList<Integer> result = new ArrayList<Integer>();
		while (i<size) {
			numbs[i] = Integer.parseInt( sc.nextLine());
			if(quo(numbs[i])) {
				result.add(numbs[i]);
			}
			i+=1;
		}
		System.out.println(result.size());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int size = Integer.parseInt(sc.nextLine()); size Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int i = 0; i 0 int[] numbs = new int[size]; numbs new int[size] size ArrayList<Integer> result = new ArrayList<Integer>(); result new ArrayList<Integer>() while (i<size) {
			numbs[i] = Integer.parseInt( sc.nextLine());
			if(quo(numbs[i])) {
				result.add(numbs[i]);
			}
			i+=1;
		} i<size i size {
			numbs[i] = Integer.parseInt( sc.nextLine());
			if(quo(numbs[i])) {
				result.add(numbs[i]);
			}
			i+=1;
		} numbs[i] = Integer.parseInt( sc.nextLine()) numbs[i] numbs i Integer.parseInt( sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc if(quo(numbs[i])) {
				result.add(numbs[i]);
			} quo(numbs[i]) quo numbs[i] numbs i {
				result.add(numbs[i]);
			} result.add(numbs[i]) result.add result numbs[i] numbs i i+=1 i 1 System.out.println(result.size()) System.out.println System.out System System.out result.size() result.size result String[] args args public class Main {
	public static boolean quo(int n) {
		if((n == 0)||(n == 1)) {
			return false;
		}else{
			for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			}
			
		}
		return true;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int size = Integer.parseInt(sc.nextLine());
		
		int i = 0;
		int[] numbs = new int[size];
		ArrayList<Integer> result = new ArrayList<Integer>();
		while (i<size) {
			numbs[i] = Integer.parseInt( sc.nextLine());
			if(quo(numbs[i])) {
				result.add(numbs[i]);
			}
			i+=1;
		}
		System.out.println(result.size());
	}

} public class Main {
	public static boolean quo(int n) {
		if((n == 0)||(n == 1)) {
			return false;
		}else{
			for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			}
			
		}
		return true;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int size = Integer.parseInt(sc.nextLine());
		
		int i = 0;
		int[] numbs = new int[size];
		ArrayList<Integer> result = new ArrayList<Integer>();
		while (i<size) {
			numbs[i] = Integer.parseInt( sc.nextLine());
			if(quo(numbs[i])) {
				result.add(numbs[i]);
			}
			i+=1;
		}
		System.out.println(result.size());
	}

} Main
import java.util.ArrayList;
import java.util.Scanner;
import java.lang.Math;

public class Main {
	public static boolean quo(int n) {
		if((n == 0)||(n == 1)) {
			return false;
		}else{
			for(int i = 2; i<= Math.sqrt(n); i+=1) {
				if(n%i == 0) {
					return false;
				}
			}
			
		}
		return true;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int size = Integer.parseInt(sc.nextLine());
		
		int i = 0;
		int[] numbs = new int[size];
		ArrayList<Integer> result = new ArrayList<Integer>();
		while (i<size) {
			numbs[i] = Integer.parseInt( sc.nextLine());
			if(quo(numbs[i])) {
				result.add(numbs[i]);
			}
			i+=1;
		}
		System.out.println(result.size());
	}

}

