import java.util.*;

public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n;
		ArrayList<Integer> num = new ArrayList<Integer>();
		int ans = 0, isPrime;
		
		n = sc.nextInt();
		
		for(int i = 0; i < n; i++){
			num.add(sc.nextInt());
		}
		
		for(int i : num){
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		}
		
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n;
		ArrayList<Integer> num = new ArrayList<Integer>();
		int ans = 0, isPrime;
		
		n = sc.nextInt();
		
		for(int i = 0; i < n; i++){
			num.add(sc.nextInt());
		}
		
		for(int i : num){
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		}
		
		System.out.println(ans);
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n;
		ArrayList<Integer> num = new ArrayList<Integer>();
		int ans = 0, isPrime;
		
		n = sc.nextInt();
		
		for(int i = 0; i < n; i++){
			num.add(sc.nextInt());
		}
		
		for(int i : num){
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		}
		
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int n;
		ArrayList<Integer> num = new ArrayList<Integer>();
		int ans = 0, isPrime;
		
		n = sc.nextInt();
		
		for(int i = 0; i < n; i++){
			num.add(sc.nextInt());
		}
		
		for(int i : num){
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		}
		
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n; n ArrayList<Integer> num = new ArrayList<Integer>(); num new ArrayList<Integer>() int ans = 0 ans 0 isPrime; isPrime n = sc.nextInt() n sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++){
			num.add(sc.nextInt());
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			num.add(sc.nextInt());
		} {
			num.add(sc.nextInt());
		} num.add(sc.nextInt()) num.add num sc.nextInt() sc.nextInt sc for(int i : num){
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		} int i num {
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		} {
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		} isPrime = 1 isPrime 1 for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			} int j = 2; int j = 2; j 2 j <= (int)Math.sqrt(i) j (int)Math.sqrt(i) Math.sqrt Math i j++ j++ j {
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			} {
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			} if(i % j == 0){
					isPrime = 0;
					break;
				} i % j == 0 i % j i j 0 {
					isPrime = 0;
					break;
				} isPrime = 0 isPrime 0 break; if(isPrime != 0){
				ans ++;
			} isPrime != 0 isPrime 0 {
				ans ++;
			} ans ++ ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n;
		ArrayList<Integer> num = new ArrayList<Integer>();
		int ans = 0, isPrime;
		
		n = sc.nextInt();
		
		for(int i = 0; i < n; i++){
			num.add(sc.nextInt());
		}
		
		for(int i : num){
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		}
		
		System.out.println(ans);
	}
} public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n;
		ArrayList<Integer> num = new ArrayList<Integer>();
		int ans = 0, isPrime;
		
		n = sc.nextInt();
		
		for(int i = 0; i < n; i++){
			num.add(sc.nextInt());
		}
		
		for(int i : num){
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		}
		
		System.out.println(ans);
	}
} Main
import java.util.*;

public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n;
		ArrayList<Integer> num = new ArrayList<Integer>();
		int ans = 0, isPrime;
		
		n = sc.nextInt();
		
		for(int i = 0; i < n; i++){
			num.add(sc.nextInt());
		}
		
		for(int i : num){
			isPrime = 1;
			for(int j = 2; j <= (int)Math.sqrt(i); j++){
				if(i % j == 0){
					isPrime = 0;
					break;
				}
			}
			
			if(isPrime != 0){
				ans ++;
			}
		}
		
		System.out.println(ans);
	}
}