import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int count = 0;
        for(int i = 0; i <a; i++ ){
            if(isPrime(input.nextInt())){
                count++;
            }//if
        }//for
        System.out.println(count);
    }//main
    
     private static boolean isPrime(int a) {
        if(a < 2) {
            return false;
        }//if 
        if(a == 2) {
            return true;
        }//if
        if(a % 2 == 0) {
            return false;
        }//if
        
        double sqrt = Math.sqrt(a);
        for (int i = 3; i <= sqrt; i += 2) {
            if (a % i == 0) {
                return false;
            }//if
        }//for
        return true;
    }//isPrime
}//main import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int count = 0;
        for(int i = 0; i <a; i++ ){
            if(isPrime(input.nextInt())){
                count++;
            }//if
        }//for
        System.out.println(count);
    }//main
    
     private static boolean isPrime(int a) {
        if(a < 2) {
            return false;
        }//if 
        if(a == 2) {
            return true;
        }//if
        if(a % 2 == 0) {
            return false;
        }//if
        
        double sqrt = Math.sqrt(a);
        for (int i = 3; i <= sqrt; i += 2) {
            if (a % i == 0) {
                return false;
            }//if
        }//for
        return true;
    }//isPrime
}//main Main public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int count = 0;
        for(int i = 0; i <a; i++ ){
            if(isPrime(input.nextInt())){
                count++;
            }//if
        }//for
        System.out.println(count);
    }//main main {
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int count = 0;
        for(int i = 0; i <a; i++ ){
            if(isPrime(input.nextInt())){
                count++;
            }//if
        }//for
        System.out.println(count);
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int a = input.nextInt(); a input.nextInt() input.nextInt input int count = 0; count 0 for(int i = 0; i <a; i++ ){
            if(isPrime(input.nextInt())){
                count++;
            }//if
        }//for int i = 0; int i = 0; i 0 i <a i a i++ i++ i {
            if(isPrime(input.nextInt())){
                count++;
            }//if
        }//for {
            if(isPrime(input.nextInt())){
                count++;
            }//if
        } if(isPrime(input.nextInt())){
                count++;
            }//if isPrime(input.nextInt()) isPrime input.nextInt() input.nextInt input {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args private static boolean isPrime(int a) {
        if(a < 2) {
            return false;
        }//if 
        if(a == 2) {
            return true;
        }//if
        if(a % 2 == 0) {
            return false;
        }//if
        
        double sqrt = Math.sqrt(a);
        for (int i = 3; i <= sqrt; i += 2) {
            if (a % i == 0) {
                return false;
            }//if
        }//for
        return true;
    }//isPrime isPrime {
        if(a < 2) {
            return false;
        }//if 
        if(a == 2) {
            return true;
        }//if
        if(a % 2 == 0) {
            return false;
        }//if
        
        double sqrt = Math.sqrt(a);
        for (int i = 3; i <= sqrt; i += 2) {
            if (a % i == 0) {
                return false;
            }//if
        }//for
        return true;
    } if(a < 2) {
            return false;
        }//if  a < 2 a 2 {
            return false;
        } return false; false if(a == 2) {
            return true;
        }//if a == 2 a 2 {
            return true;
        } return true; true if(a % 2 == 0) {
            return false;
        }//if a % 2 == 0 a % 2 a 2 0 {
            return false;
        } return false; false double sqrt = Math.sqrt(a); sqrt Math.sqrt(a) Math.sqrt Math a for (int i = 3; i <= sqrt; i += 2) {
            if (a % i == 0) {
                return false;
            }//if
        }//for int i = 3; int i = 3; i 3 i <= sqrt i sqrt i += 2 i += 2 i 2 {
            if (a % i == 0) {
                return false;
            }//if
        }//for {
            if (a % i == 0) {
                return false;
            }//if
        } if (a % i == 0) {
                return false;
            }//if a % i == 0 a % i a i 0 {
                return false;
            } return false; false return true; true int a a public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int count = 0;
        for(int i = 0; i <a; i++ ){
            if(isPrime(input.nextInt())){
                count++;
            }//if
        }//for
        System.out.println(count);
    }//main
    
     private static boolean isPrime(int a) {
        if(a < 2) {
            return false;
        }//if 
        if(a == 2) {
            return true;
        }//if
        if(a % 2 == 0) {
            return false;
        }//if
        
        double sqrt = Math.sqrt(a);
        for (int i = 3; i <= sqrt; i += 2) {
            if (a % i == 0) {
                return false;
            }//if
        }//for
        return true;
    }//isPrime
}//main public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int count = 0;
        for(int i = 0; i <a; i++ ){
            if(isPrime(input.nextInt())){
                count++;
            }//if
        }//for
        System.out.println(count);
    }//main
    
     private static boolean isPrime(int a) {
        if(a < 2) {
            return false;
        }//if 
        if(a == 2) {
            return true;
        }//if
        if(a % 2 == 0) {
            return false;
        }//if
        
        double sqrt = Math.sqrt(a);
        for (int i = 3; i <= sqrt; i += 2) {
            if (a % i == 0) {
                return false;
            }//if
        }//for
        return true;
    }//isPrime
}//main Main
import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int count = 0;
        for(int i = 0; i <a; i++ ){
            if(isPrime(input.nextInt())){
                count++;
            }//if
        }//for
        System.out.println(count);
    }//main
    
     private static boolean isPrime(int a) {
        if(a < 2) {
            return false;
        }//if 
        if(a == 2) {
            return true;
        }//if
        if(a % 2 == 0) {
            return false;
        }//if
        
        double sqrt = Math.sqrt(a);
        for (int i = 3; i <= sqrt; i += 2) {
            if (a % i == 0) {
                return false;
            }//if
        }//for
        return true;
    }//isPrime
}//main
