import java.util.*;
public class Main {
	public static void main(String args[]){
		
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] nums  = new int[n];
		for(int i=0;i<n;i++){
			nums[i] = sc.nextInt();
		}
		int count = 0;
		for(int x:nums){
			if(isPrime(x)){
				count++;
			}
		}
		System.out.println(count);
	}
	public static  boolean isPrime(int number){
		for(int i=2;i*i<=number;i++){
			if(number%i==0) return false;
		}
		return true;
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]){
		
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] nums  = new int[n];
		for(int i=0;i<n;i++){
			nums[i] = sc.nextInt();
		}
		int count = 0;
		for(int x:nums){
			if(isPrime(x)){
				count++;
			}
		}
		System.out.println(count);
	}
	public static  boolean isPrime(int number){
		for(int i=2;i*i<=number;i++){
			if(number%i==0) return false;
		}
		return true;
	}
} Main public static void main(String args[]){
		
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] nums  = new int[n];
		for(int i=0;i<n;i++){
			nums[i] = sc.nextInt();
		}
		int count = 0;
		for(int x:nums){
			if(isPrime(x)){
				count++;
			}
		}
		System.out.println(count);
	} main {
		
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] nums  = new int[n];
		for(int i=0;i<n;i++){
			nums[i] = sc.nextInt();
		}
		int count = 0;
		for(int x:nums){
			if(isPrime(x)){
				count++;
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] nums  = new int[n]; nums new int[n] n for(int i=0;i<n;i++){
			nums[i] = sc.nextInt();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			nums[i] = sc.nextInt();
		} {
			nums[i] = sc.nextInt();
		} nums[i] = sc.nextInt() nums[i] nums i sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int x:nums){
			if(isPrime(x)){
				count++;
			}
		} int x nums {
			if(isPrime(x)){
				count++;
			}
		} {
			if(isPrime(x)){
				count++;
			}
		} if(isPrime(x)){
				count++;
			} isPrime(x) isPrime x {
				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){
		for(int i=2;i*i<=number;i++){
			if(number%i==0) return false;
		}
		return true;
	} isPrime {
		for(int i=2;i*i<=number;i++){
			if(number%i==0) return false;
		}
		return true;
	} for(int i=2;i*i<=number;i++){
			if(number%i==0) return false;
		} int i=2; int i=2; i 2 i*i<=number i*i i i number i++ i++ i {
			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; false return true; true int number number public class Main {
	public static void main(String args[]){
		
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] nums  = new int[n];
		for(int i=0;i<n;i++){
			nums[i] = sc.nextInt();
		}
		int count = 0;
		for(int x:nums){
			if(isPrime(x)){
				count++;
			}
		}
		System.out.println(count);
	}
	public static  boolean isPrime(int number){
		for(int i=2;i*i<=number;i++){
			if(number%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[] nums  = new int[n];
		for(int i=0;i<n;i++){
			nums[i] = sc.nextInt();
		}
		int count = 0;
		for(int x:nums){
			if(isPrime(x)){
				count++;
			}
		}
		System.out.println(count);
	}
	public static  boolean isPrime(int number){
		for(int i=2;i*i<=number;i++){
			if(number%i==0) return false;
		}
		return true;
	}
} Main
import java.util.*;
public class Main {
	public static void main(String args[]){
		
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] nums  = new int[n];
		for(int i=0;i<n;i++){
			nums[i] = sc.nextInt();
		}
		int count = 0;
		for(int x:nums){
			if(isPrime(x)){
				count++;
			}
		}
		System.out.println(count);
	}
	public static  boolean isPrime(int number){
		for(int i=2;i*i<=number;i++){
			if(number%i==0) return false;
		}
		return true;
	}
}