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

public class Main {
	public static void main(String[] args){
		int i, size, count = 0;
		List<Integer> numbers = new ArrayList<Integer>();

		Scanner in = new Scanner(System.in);
		
		size = Integer.parseInt(in.nextLine());
		for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));

		for(i = 0; i < size; i++){
			if(isPrime(numbers.get(i)) == true) count++;
		}
		System.out.println(count);
		}
	
	private static boolean isPrime(int number){
		int i;
		int route = (int)Math.sqrt(number) + 1;

		if(number == 1) return false;

		for(i = 2; i < route; i++){
			if(number % i == 0) return false;
		}
		return true;	
	}
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.lang.Math; Math java.lang public class Main {
	public static void main(String[] args){
		int i, size, count = 0;
		List<Integer> numbers = new ArrayList<Integer>();

		Scanner in = new Scanner(System.in);
		
		size = Integer.parseInt(in.nextLine());
		for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));

		for(i = 0; i < size; i++){
			if(isPrime(numbers.get(i)) == true) count++;
		}
		System.out.println(count);
		}
	
	private static boolean isPrime(int number){
		int i;
		int route = (int)Math.sqrt(number) + 1;

		if(number == 1) return false;

		for(i = 2; i < route; i++){
			if(number % i == 0) return false;
		}
		return true;	
	}
} Main public static void main(String[] args){
		int i, size, count = 0;
		List<Integer> numbers = new ArrayList<Integer>();

		Scanner in = new Scanner(System.in);
		
		size = Integer.parseInt(in.nextLine());
		for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));

		for(i = 0; i < size; i++){
			if(isPrime(numbers.get(i)) == true) count++;
		}
		System.out.println(count);
		} main {
		int i, size, count = 0;
		List<Integer> numbers = new ArrayList<Integer>();

		Scanner in = new Scanner(System.in);
		
		size = Integer.parseInt(in.nextLine());
		for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));

		for(i = 0; i < size; i++){
			if(isPrime(numbers.get(i)) == true) count++;
		}
		System.out.println(count);
		} int i i size size count = 0; count 0 List<Integer> numbers = new ArrayList<Integer>(); numbers new ArrayList<Integer>() Scanner in = new Scanner(System.in); in new Scanner(System.in) size = Integer.parseInt(in.nextLine()) size Integer.parseInt(in.nextLine()) Integer.parseInt Integer in.nextLine() in.nextLine in for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine())); i = 0; i = 0 i 0 i < size i size i++ i++ i numbers.add(Integer.parseInt(in.nextLine())); numbers.add(Integer.parseInt(in.nextLine())) numbers.add numbers Integer.parseInt(in.nextLine()) Integer.parseInt Integer in.nextLine() in.nextLine in for(i = 0; i < size; i++){
			if(isPrime(numbers.get(i)) == true) count++;
		} i = 0; i = 0 i 0 i < size i size i++ i++ i {
			if(isPrime(numbers.get(i)) == true) count++;
		} {
			if(isPrime(numbers.get(i)) == true) count++;
		} if(isPrime(numbers.get(i)) == true) count++; isPrime(numbers.get(i)) == true isPrime(numbers.get(i)) isPrime numbers.get(i) numbers.get numbers i true count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args private static boolean isPrime(int number){
		int i;
		int route = (int)Math.sqrt(number) + 1;

		if(number == 1) return false;

		for(i = 2; i < route; i++){
			if(number % i == 0) return false;
		}
		return true;	
	} isPrime {
		int i;
		int route = (int)Math.sqrt(number) + 1;

		if(number == 1) return false;

		for(i = 2; i < route; i++){
			if(number % i == 0) return false;
		}
		return true;	
	} int i; i int route = (int)Math.sqrt(number) + 1; route (int)Math.sqrt(number) + 1 (int)Math.sqrt(number) Math.sqrt Math number 1 if(number == 1) return false; number == 1 number 1 return false; false for(i = 2; i < route; i++){
			if(number % i == 0) return false;
		} i = 2; i = 2 i 2 i < route i route i++ i++ i {
			if(number % i == 0) return false;
		} {
			if(number % i == 0) return false;
		} if(number % i == 0) return false; number % i == 0 number % i number i 0 return false; false return true; true int number number public class Main {
	public static void main(String[] args){
		int i, size, count = 0;
		List<Integer> numbers = new ArrayList<Integer>();

		Scanner in = new Scanner(System.in);
		
		size = Integer.parseInt(in.nextLine());
		for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));

		for(i = 0; i < size; i++){
			if(isPrime(numbers.get(i)) == true) count++;
		}
		System.out.println(count);
		}
	
	private static boolean isPrime(int number){
		int i;
		int route = (int)Math.sqrt(number) + 1;

		if(number == 1) return false;

		for(i = 2; i < route; i++){
			if(number % i == 0) return false;
		}
		return true;	
	}
} public class Main {
	public static void main(String[] args){
		int i, size, count = 0;
		List<Integer> numbers = new ArrayList<Integer>();

		Scanner in = new Scanner(System.in);
		
		size = Integer.parseInt(in.nextLine());
		for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));

		for(i = 0; i < size; i++){
			if(isPrime(numbers.get(i)) == true) count++;
		}
		System.out.println(count);
		}
	
	private static boolean isPrime(int number){
		int i;
		int route = (int)Math.sqrt(number) + 1;

		if(number == 1) return false;

		for(i = 2; i < route; i++){
			if(number % i == 0) return false;
		}
		return true;	
	}
} Main
import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;
import java.lang.Math;

public class Main {
	public static void main(String[] args){
		int i, size, count = 0;
		List<Integer> numbers = new ArrayList<Integer>();

		Scanner in = new Scanner(System.in);
		
		size = Integer.parseInt(in.nextLine());
		for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));

		for(i = 0; i < size; i++){
			if(isPrime(numbers.get(i)) == true) count++;
		}
		System.out.println(count);
		}
	
	private static boolean isPrime(int number){
		int i;
		int route = (int)Math.sqrt(number) + 1;

		if(number == 1) return false;

		for(i = 2; i < route; i++){
			if(number % i == 0) return false;
		}
		return true;	
	}
}