import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		while(n-->0) {
			int num = sc.nextInt();
			if(isPrime(num)) cnt++;
		}
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int num){
		for(int i=2;i*i<=num;i++)
			if(num%i==0) return false;
		return true;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		while(n-->0) {
			int num = sc.nextInt();
			if(isPrime(num)) cnt++;
		}
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int num){
		for(int i=2;i*i<=num;i++)
			if(num%i==0) return false;
		return true;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		while(n-->0) {
			int num = sc.nextInt();
			if(isPrime(num)) cnt++;
		}
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		while(n-->0) {
			int num = sc.nextInt();
			if(isPrime(num)) cnt++;
		}
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 while(n-->0) {
			int num = sc.nextInt();
			if(isPrime(num)) cnt++;
		} n-->0 n-- n 0 {
			int num = sc.nextInt();
			if(isPrime(num)) cnt++;
		} int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if(isPrime(num)) cnt++; isPrime(num) isPrime num cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public static boolean isPrime(int num){
		for(int i=2;i*i<=num;i++)
			if(num%i==0) return false;
		return true;
	} isPrime {
		for(int i=2;i*i<=num;i++)
			if(num%i==0) return false;
		return true;
	} for(int i=2;i*i<=num;i++)
			if(num%i==0) return false; int i=2; int i=2; i 2 i*i<=num i*i i i num i++ i++ i if(num%i==0) return false; if(num%i==0) return false; num%i==0 num%i num i 0 return false; false return true; true int num num public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		while(n-->0) {
			int num = sc.nextInt();
			if(isPrime(num)) cnt++;
		}
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int num){
		for(int i=2;i*i<=num;i++)
			if(num%i==0) return false;
		return true;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		while(n-->0) {
			int num = sc.nextInt();
			if(isPrime(num)) cnt++;
		}
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int num){
		for(int i=2;i*i<=num;i++)
			if(num%i==0) return false;
		return true;
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		while(n-->0) {
			int num = sc.nextInt();
			if(isPrime(num)) cnt++;
		}
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int num){
		for(int i=2;i*i<=num;i++)
			if(num%i==0) return false;
		return true;
	}
}
