import java.util.*;

public class Main {
	public static boolean is_prime(int x){
		switch(x){
		case 2 : return true;
		case 3 : return true;
		default:
			for(int e = 2 ; e <= Math.sqrt(x) ; e++){
				if(x % e ==0) return false;
			}
		return true;
		
		}
	}
	public static void main(String[] args) {
		int c = 0;
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		boolean[] tof = new boolean[100000000];
		Arrays.fill(tof, false);
		for(int i = 1 ; i <= N ; i++){
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		}
		for(int j = 0 ; j < 100000000 ; j++){
			if(tof[j] == true) c++;
		}
		System.out.println(c);
	}

} import java.util.*; util.* java public class Main {
	public static boolean is_prime(int x){
		switch(x){
		case 2 : return true;
		case 3 : return true;
		default:
			for(int e = 2 ; e <= Math.sqrt(x) ; e++){
				if(x % e ==0) return false;
			}
		return true;
		
		}
	}
	public static void main(String[] args) {
		int c = 0;
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		boolean[] tof = new boolean[100000000];
		Arrays.fill(tof, false);
		for(int i = 1 ; i <= N ; i++){
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		}
		for(int j = 0 ; j < 100000000 ; j++){
			if(tof[j] == true) c++;
		}
		System.out.println(c);
	}

} Main public static boolean is_prime(int x){
		switch(x){
		case 2 : return true;
		case 3 : return true;
		default:
			for(int e = 2 ; e <= Math.sqrt(x) ; e++){
				if(x % e ==0) return false;
			}
		return true;
		
		}
	} is_prime {
		switch(x){
		case 2 : return true;
		case 3 : return true;
		default:
			for(int e = 2 ; e <= Math.sqrt(x) ; e++){
				if(x % e ==0) return false;
			}
		return true;
		
		}
	} switch(x){
		case 2 : return true;
		case 3 : return true;
		default:
			for(int e = 2 ; e <= Math.sqrt(x) ; e++){
				if(x % e ==0) return false;
			}
		return true;
		
		} x case 2 : 2 case 2 : return true; true case 3 : 3 case 3 : return true; true default: default: for(int e = 2 ; e <= Math.sqrt(x) ; e++){
				if(x % e ==0) return false;
			} int e = 2 ; int e = 2 ; e 2 e <= Math.sqrt(x) e Math.sqrt(x) Math.sqrt Math x e++ e++ e {
				if(x % e ==0) return false;
			} {
				if(x % e ==0) return false;
			} if(x % e ==0) return false; x % e ==0 x % e x e 0 return false; false return true; true int x x public static void main(String[] args) {
		int c = 0;
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		boolean[] tof = new boolean[100000000];
		Arrays.fill(tof, false);
		for(int i = 1 ; i <= N ; i++){
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		}
		for(int j = 0 ; j < 100000000 ; j++){
			if(tof[j] == true) c++;
		}
		System.out.println(c);
	} main {
		int c = 0;
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		boolean[] tof = new boolean[100000000];
		Arrays.fill(tof, false);
		for(int i = 1 ; i <= N ; i++){
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		}
		for(int j = 0 ; j < 100000000 ; j++){
			if(tof[j] == true) c++;
		}
		System.out.println(c);
	} int c = 0; c 0 Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int N = scn.nextInt(); N scn.nextInt() scn.nextInt scn boolean[] tof = new boolean[100000000]; tof new boolean[100000000] 100000000 Arrays.fill(tof, false) Arrays.fill Arrays tof false for(int i = 1 ; i <= N ; i++){
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		} int i = 1 ; int i = 1 ; i 1 i <= N i N i++ i++ i {
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		} {
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		} int k = scn.nextInt(); k scn.nextInt() scn.nextInt scn if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			} tof[k-1] == false tof[k-1] tof k-1 k 1 false {
				tof[k-1] = is_prime(k);
			} tof[k-1] = is_prime(k) tof[k-1] tof k-1 k 1 is_prime(k) is_prime k for(int j = 0 ; j < 100000000 ; j++){
			if(tof[j] == true) c++;
		} int j = 0 ; int j = 0 ; j 0 j < 100000000 j 100000000 j++ j++ j {
			if(tof[j] == true) c++;
		} {
			if(tof[j] == true) c++;
		} if(tof[j] == true) c++; tof[j] == true tof[j] tof j true c++ c System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
	public static boolean is_prime(int x){
		switch(x){
		case 2 : return true;
		case 3 : return true;
		default:
			for(int e = 2 ; e <= Math.sqrt(x) ; e++){
				if(x % e ==0) return false;
			}
		return true;
		
		}
	}
	public static void main(String[] args) {
		int c = 0;
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		boolean[] tof = new boolean[100000000];
		Arrays.fill(tof, false);
		for(int i = 1 ; i <= N ; i++){
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		}
		for(int j = 0 ; j < 100000000 ; j++){
			if(tof[j] == true) c++;
		}
		System.out.println(c);
	}

} public class Main {
	public static boolean is_prime(int x){
		switch(x){
		case 2 : return true;
		case 3 : return true;
		default:
			for(int e = 2 ; e <= Math.sqrt(x) ; e++){
				if(x % e ==0) return false;
			}
		return true;
		
		}
	}
	public static void main(String[] args) {
		int c = 0;
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		boolean[] tof = new boolean[100000000];
		Arrays.fill(tof, false);
		for(int i = 1 ; i <= N ; i++){
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		}
		for(int j = 0 ; j < 100000000 ; j++){
			if(tof[j] == true) c++;
		}
		System.out.println(c);
	}

} Main
import java.util.*;

public class Main {
	public static boolean is_prime(int x){
		switch(x){
		case 2 : return true;
		case 3 : return true;
		default:
			for(int e = 2 ; e <= Math.sqrt(x) ; e++){
				if(x % e ==0) return false;
			}
		return true;
		
		}
	}
	public static void main(String[] args) {
		int c = 0;
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		boolean[] tof = new boolean[100000000];
		Arrays.fill(tof, false);
		for(int i = 1 ; i <= N ; i++){
			int k = scn.nextInt();
			if(tof[k-1] == false){
				tof[k-1] = is_prime(k);
			}
		}
		for(int j = 0 ; j < 100000000 ; j++){
			if(tof[j] == true) c++;
		}
		System.out.println(c);
	}

}