import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		
		int a;
		int num=0;
		for(int i=0;i<N;i++){
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		}
		System.out.println(num);

	}
	
	public static boolean isPrime(int a){
		boolean warenai=true;
		for(int i=2;i<=Math.sqrt(a);i++){
			if(a%i==0) {
				warenai=false;
				break;
			}
		}
		return warenai;
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		
		int a;
		int num=0;
		for(int i=0;i<N;i++){
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		}
		System.out.println(num);

	}
	
	public static boolean isPrime(int a){
		boolean warenai=true;
		for(int i=2;i<=Math.sqrt(a);i++){
			if(a%i==0) {
				warenai=false;
				break;
			}
		}
		return warenai;
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		
		int a;
		int num=0;
		for(int i=0;i<N;i++){
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		}
		System.out.println(num);

	} main {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		
		int a;
		int num=0;
		for(int i=0;i<N;i++){
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		}
		System.out.println(num);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int a; a int num=0; num 0 for(int i=0;i<N;i++){
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		} {
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		} a = Integer.parseInt(sc.next()) a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(isPrime(a)) num++; isPrime(a) isPrime a num++ num System.out.println(num) System.out.println System.out System System.out num String[] args args public static boolean isPrime(int a){
		boolean warenai=true;
		for(int i=2;i<=Math.sqrt(a);i++){
			if(a%i==0) {
				warenai=false;
				break;
			}
		}
		return warenai;
	} isPrime {
		boolean warenai=true;
		for(int i=2;i<=Math.sqrt(a);i++){
			if(a%i==0) {
				warenai=false;
				break;
			}
		}
		return warenai;
	} boolean warenai=true; warenai true for(int i=2;i<=Math.sqrt(a);i++){
			if(a%i==0) {
				warenai=false;
				break;
			}
		} int i=2; int i=2; i 2 i<=Math.sqrt(a) i Math.sqrt(a) Math.sqrt Math a i++ i++ i {
			if(a%i==0) {
				warenai=false;
				break;
			}
		} {
			if(a%i==0) {
				warenai=false;
				break;
			}
		} if(a%i==0) {
				warenai=false;
				break;
			} a%i==0 a%i a i 0 {
				warenai=false;
				break;
			} warenai=false warenai false break; return warenai; warenai int a a public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		
		int a;
		int num=0;
		for(int i=0;i<N;i++){
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		}
		System.out.println(num);

	}
	
	public static boolean isPrime(int a){
		boolean warenai=true;
		for(int i=2;i<=Math.sqrt(a);i++){
			if(a%i==0) {
				warenai=false;
				break;
			}
		}
		return warenai;
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		
		int a;
		int num=0;
		for(int i=0;i<N;i++){
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		}
		System.out.println(num);

	}
	
	public static boolean isPrime(int a){
		boolean warenai=true;
		for(int i=2;i<=Math.sqrt(a);i++){
			if(a%i==0) {
				warenai=false;
				break;
			}
		}
		return warenai;
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		
		int a;
		int num=0;
		for(int i=0;i<N;i++){
			a = Integer.parseInt(sc.next());
			if(isPrime(a)) num++;
		}
		System.out.println(num);

	}
	
	public static boolean isPrime(int a){
		boolean warenai=true;
		for(int i=2;i<=Math.sqrt(a);i++){
			if(a%i==0) {
				warenai=false;
				break;
			}
		}
		return warenai;
	}

}