

import java.util.*;
 
public class  Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int x = 0;
       

        int a[] = new int[N];
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
        }
        for(int w = 0; w < N; w++){
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        }
        System.out.println(x);
    }


    public static boolean isPrime(int num) {
        
        if (num < 2) return false;
        else if (num == 2) return true;
        else if (num % 2 == 0) return false; 
    
        double sqrtNum = Math.sqrt(num);
        for (int i = 3; i <= sqrtNum; i += 2){
            if (num % 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 x = 0;
       

        int a[] = new int[N];
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
        }
        for(int w = 0; w < N; w++){
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        }
        System.out.println(x);
    }


    public static boolean isPrime(int num) {
        
        if (num < 2) return false;
        else if (num == 2) return true;
        else if (num % 2 == 0) return false; 
    
        double sqrtNum = Math.sqrt(num);
        for (int i = 3; i <= sqrtNum; i += 2){
            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 x = 0;
       

        int a[] = new int[N];
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
        }
        for(int w = 0; w < N; w++){
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        }
        System.out.println(x);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int x = 0;
       

        int a[] = new int[N];
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
        }
        for(int w = 0; w < N; w++){
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        }
        System.out.println(x);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int x = 0; x 0 int a[] = new int[N]; a new int[N] N for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            a[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for(int w = 0; w < N; w++){
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        } int w = 0; int w = 0; w 0 w < N w N w++ w++ w {
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        } {
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        } int num = a[w]; num a[w] a w if(isPrime(num) == true){
                x++;
            } isPrime(num) == true isPrime(num) isPrime num true {
                x++;
            } x++ x System.out.println(x) System.out.println System.out System System.out x String[] args args public static boolean isPrime(int num) {
        
        if (num < 2) return false;
        else if (num == 2) return true;
        else if (num % 2 == 0) return false; 
    
        double sqrtNum = Math.sqrt(num);
        for (int i = 3; i <= sqrtNum; i += 2){
            if (num % i == 0){
        
            return false;
            }
        }
        return true;       
    } isPrime {
        
        if (num < 2) return false;
        else if (num == 2) return true;
        else if (num % 2 == 0) return false; 
    
        double sqrtNum = Math.sqrt(num);
        for (int i = 3; i <= sqrtNum; i += 2){
            if (num % i == 0){
        
            return false;
            }
        }
        return true;       
    } if (num < 2) return false;
        else if (num == 2) return true;
        else if (num % 2 == 0) return false; num < 2 num 2 return false; false if (num == 2) return true;
        else if (num % 2 == 0) return false; num == 2 num 2 return true; true if (num % 2 == 0) return false; num % 2 == 0 num % 2 num 2 0 return false; false double sqrtNum = Math.sqrt(num); sqrtNum Math.sqrt(num) Math.sqrt Math num for (int i = 3; i <= sqrtNum; i += 2){
            if (num % i == 0){
        
            return false;
            }
        } int i = 3; int i = 3; i 3 i <= sqrtNum i sqrtNum i += 2 i += 2 i 2 {
            if (num % i == 0){
        
            return false;
            }
        } {
            if (num % i == 0){
        
            return false;
            }
        } if (num % i == 0){
        
            return false;
            } num % i == 0 num % i num i 0 {
        
            return false;
            } 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 x = 0;
       

        int a[] = new int[N];
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
        }
        for(int w = 0; w < N; w++){
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        }
        System.out.println(x);
    }


    public static boolean isPrime(int num) {
        
        if (num < 2) return false;
        else if (num == 2) return true;
        else if (num % 2 == 0) return false; 
    
        double sqrtNum = Math.sqrt(num);
        for (int i = 3; i <= sqrtNum; i += 2){
            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 x = 0;
       

        int a[] = new int[N];
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
        }
        for(int w = 0; w < N; w++){
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        }
        System.out.println(x);
    }


    public static boolean isPrime(int num) {
        
        if (num < 2) return false;
        else if (num == 2) return true;
        else if (num % 2 == 0) return false; 
    
        double sqrtNum = Math.sqrt(num);
        for (int i = 3; i <= sqrtNum; i += 2){
            if (num % 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 x = 0;
       

        int a[] = new int[N];
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
        }
        for(int w = 0; w < N; w++){
            int num = a[w];
           
            if(isPrime(num) == true){
                x++;
            }
        }
        System.out.println(x);
    }


    public static boolean isPrime(int num) {
        
        if (num < 2) return false;
        else if (num == 2) return true;
        else if (num % 2 == 0) return false; 
    
        double sqrtNum = Math.sqrt(num);
        for (int i = 3; i <= sqrtNum; i += 2){
            if (num % i == 0){
        
            return false;
            }
        }
        return true;       
    }
}
