import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		ArrayList<String> str = new ArrayList<String>();
		while(in.hasNext()) {
			String buf = in.nextLine();
			str.add(buf);
		}
		
		int facter[];
		facter = new int[str.size()];

		for (int i = 0; i < str.size(); i++) {
			facter[i] = Integer.parseInt(str.get(i));
		}
		
		int count = 0;
		
		for (int i = 0; i < facter.length; i++) {
			if (isPrime(facter[i])) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	public static boolean isPrime (int number) {
		if (number == 2) {
			return true;
		}
		if ((number < 2) || ((number % 2) == 0)) {
			return false;
		}
		
		for (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {
			if ((number % i) == 0) {
				
				return false;
			}
			
		}

		return true;
	}
	
	

} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		ArrayList<String> str = new ArrayList<String>();
		while(in.hasNext()) {
			String buf = in.nextLine();
			str.add(buf);
		}
		
		int facter[];
		facter = new int[str.size()];

		for (int i = 0; i < str.size(); i++) {
			facter[i] = Integer.parseInt(str.get(i));
		}
		
		int count = 0;
		
		for (int i = 0; i < facter.length; i++) {
			if (isPrime(facter[i])) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	public static boolean isPrime (int number) {
		if (number == 2) {
			return true;
		}
		if ((number < 2) || ((number % 2) == 0)) {
			return false;
		}
		
		for (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {
			if ((number % i) == 0) {
				
				return false;
			}
			
		}

		return true;
	}
	
	

} Main public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		ArrayList<String> str = new ArrayList<String>();
		while(in.hasNext()) {
			String buf = in.nextLine();
			str.add(buf);
		}
		
		int facter[];
		facter = new int[str.size()];

		for (int i = 0; i < str.size(); i++) {
			facter[i] = Integer.parseInt(str.get(i));
		}
		
		int count = 0;
		
		for (int i = 0; i < facter.length; i++) {
			if (isPrime(facter[i])) {
				count++;
			}
		}
		
		System.out.println(count);
	} main {
		Scanner in = new Scanner(System.in);
		ArrayList<String> str = new ArrayList<String>();
		while(in.hasNext()) {
			String buf = in.nextLine();
			str.add(buf);
		}
		
		int facter[];
		facter = new int[str.size()];

		for (int i = 0; i < str.size(); i++) {
			facter[i] = Integer.parseInt(str.get(i));
		}
		
		int count = 0;
		
		for (int i = 0; i < facter.length; i++) {
			if (isPrime(facter[i])) {
				count++;
			}
		}
		
		System.out.println(count);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) ArrayList<String> str = new ArrayList<String>(); str new ArrayList<String>() while(in.hasNext()) {
			String buf = in.nextLine();
			str.add(buf);
		} in.hasNext() in.hasNext in {
			String buf = in.nextLine();
			str.add(buf);
		} String buf = in.nextLine(); buf in.nextLine() in.nextLine in str.add(buf) str.add str buf int facter[]; facter facter = new int[str.size()] facter new int[str.size()] str.size() str.size str for (int i = 0; i < str.size(); i++) {
			facter[i] = Integer.parseInt(str.get(i));
		} int i = 0; int i = 0; i 0 i < str.size() i str.size() str.size str i++ i++ i {
			facter[i] = Integer.parseInt(str.get(i));
		} {
			facter[i] = Integer.parseInt(str.get(i));
		} facter[i] = Integer.parseInt(str.get(i)) facter[i] facter i Integer.parseInt(str.get(i)) Integer.parseInt Integer str.get(i) str.get str i int count = 0; count 0 for (int i = 0; i < facter.length; i++) {
			if (isPrime(facter[i])) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < facter.length i facter.length facter facter.length i++ i++ i {
			if (isPrime(facter[i])) {
				count++;
			}
		} {
			if (isPrime(facter[i])) {
				count++;
			}
		} if (isPrime(facter[i])) {
				count++;
			} isPrime(facter[i]) isPrime facter[i] facter i {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public static boolean isPrime (int number) {
		if (number == 2) {
			return true;
		}
		if ((number < 2) || ((number % 2) == 0)) {
			return false;
		}
		
		for (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {
			if ((number % i) == 0) {
				
				return false;
			}
			
		}

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

		return true;
	} if (number == 2) {
			return true;
		} number == 2 number 2 {
			return true;
		} return true; true if ((number < 2) || ((number % 2) == 0)) {
			return false;
		} (number < 2) || ((number % 2) == 0) (number < 2) number 2 ((number % 2) == 0) (number % 2) number 2 0 {
			return false;
		} return false; false for (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {
			if ((number % i) == 0) {
				
				return false;
			}
			
		} int i = 3; int i = 3; i 3 i <= Math.sqrt(number) i Math.sqrt(number) Math.sqrt Math number i = i + 2 i = i + 2 i i + 2 i 2 {
			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;
			} return false; false return true; true int number number public class Main {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		ArrayList<String> str = new ArrayList<String>();
		while(in.hasNext()) {
			String buf = in.nextLine();
			str.add(buf);
		}
		
		int facter[];
		facter = new int[str.size()];

		for (int i = 0; i < str.size(); i++) {
			facter[i] = Integer.parseInt(str.get(i));
		}
		
		int count = 0;
		
		for (int i = 0; i < facter.length; i++) {
			if (isPrime(facter[i])) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	public static boolean isPrime (int number) {
		if (number == 2) {
			return true;
		}
		if ((number < 2) || ((number % 2) == 0)) {
			return false;
		}
		
		for (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {
			if ((number % i) == 0) {
				
				return false;
			}
			
		}

		return true;
	}
	
	

} public class Main {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		ArrayList<String> str = new ArrayList<String>();
		while(in.hasNext()) {
			String buf = in.nextLine();
			str.add(buf);
		}
		
		int facter[];
		facter = new int[str.size()];

		for (int i = 0; i < str.size(); i++) {
			facter[i] = Integer.parseInt(str.get(i));
		}
		
		int count = 0;
		
		for (int i = 0; i < facter.length; i++) {
			if (isPrime(facter[i])) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	public static boolean isPrime (int number) {
		if (number == 2) {
			return true;
		}
		if ((number < 2) || ((number % 2) == 0)) {
			return false;
		}
		
		for (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {
			if ((number % i) == 0) {
				
				return false;
			}
			
		}

		return true;
	}
	
	

} Main
import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		ArrayList<String> str = new ArrayList<String>();
		while(in.hasNext()) {
			String buf = in.nextLine();
			str.add(buf);
		}
		
		int facter[];
		facter = new int[str.size()];

		for (int i = 0; i < str.size(); i++) {
			facter[i] = Integer.parseInt(str.get(i));
		}
		
		int count = 0;
		
		for (int i = 0; i < facter.length; i++) {
			if (isPrime(facter[i])) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	public static boolean isPrime (int number) {
		if (number == 2) {
			return true;
		}
		if ((number < 2) || ((number % 2) == 0)) {
			return false;
		}
		
		for (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {
			if ((number % i) == 0) {
				
				return false;
			}
			
		}

		return true;
	}
	
	

}