import java.util.*;
//import java.util.Math.*;

public class Main {
    public static void main(String[] args) throws Exception {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int A[] = new int[n];
    int i;
    int count = 0;
    
    for(i = 0; i < n; i++){
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            count++;
        }
    }
 
    System.out.println(count);
    
    }
    
    public static boolean isprime(int x){
        int i = 0;
       // System.out.println(x);
        if(x == 2){
            return true;
        }else if((x % 2) == 0){
            return false;
        }else{
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        }
        return true;
    }
}
 import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int A[] = new int[n];
    int i;
    int count = 0;
    
    for(i = 0; i < n; i++){
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            count++;
        }
    }
 
    System.out.println(count);
    
    }
    
    public static boolean isprime(int x){
        int i = 0;
       // System.out.println(x);
        if(x == 2){
            return true;
        }else if((x % 2) == 0){
            return false;
        }else{
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        }
        return true;
    }
} Main public static void main(String[] args) throws Exception {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int A[] = new int[n];
    int i;
    int count = 0;
    
    for(i = 0; i < n; i++){
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            count++;
        }
    }
 
    System.out.println(count);
    
    } main {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int A[] = new int[n];
    int i;
    int count = 0;
    
    for(i = 0; i < n; i++){
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            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 A[] = new int[n]; A new int[n] n int i; i int count = 0; count 0 for(i = 0; i < n; i++){
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            count++;
        }
    } i = 0; i = 0 i 0 i < n i n i++ i++ i {
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            count++;
        }
    } {
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            count++;
        }
    } A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc if(isprime(A[i]) == true){
            count++;
        } isprime(A[i]) == true isprime(A[i]) isprime A[i] A i true {
            count++;
        } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public static boolean isprime(int x){
        int i = 0;
       // System.out.println(x);
        if(x == 2){
            return true;
        }else if((x % 2) == 0){
            return false;
        }else{
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        }
        return true;
    } isprime {
        int i = 0;
       // System.out.println(x);
        if(x == 2){
            return true;
        }else if((x % 2) == 0){
            return false;
        }else{
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        }
        return true;
    } int i = 0; i 0 if(x == 2){
            return true;
        }else if((x % 2) == 0){
            return false;
        }else{
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        } x == 2 x 2 {
            return true;
        } return true; true if((x % 2) == 0){
            return false;
        }else{
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        } (x % 2) == 0 (x % 2) x 2 0 {
            return false;
        } return false; false {
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        } i = 3 i 3 while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            } i <= Math.sqrt(x) i Math.sqrt(x) Math.sqrt Math x {
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            } if((x % i) == 0){
                    return false;
                } (x % i) == 0 (x % i) x i 0 {
                    return false;
                } return false; false i = i + 2 i i + 2 i 2 return true; true int x x public class Main {
    public static void main(String[] args) throws Exception {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int A[] = new int[n];
    int i;
    int count = 0;
    
    for(i = 0; i < n; i++){
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            count++;
        }
    }
 
    System.out.println(count);
    
    }
    
    public static boolean isprime(int x){
        int i = 0;
       // System.out.println(x);
        if(x == 2){
            return true;
        }else if((x % 2) == 0){
            return false;
        }else{
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        }
        return true;
    }
} public class Main {
    public static void main(String[] args) throws Exception {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int A[] = new int[n];
    int i;
    int count = 0;
    
    for(i = 0; i < n; i++){
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            count++;
        }
    }
 
    System.out.println(count);
    
    }
    
    public static boolean isprime(int x){
        int i = 0;
       // System.out.println(x);
        if(x == 2){
            return true;
        }else if((x % 2) == 0){
            return false;
        }else{
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        }
        return true;
    }
} Main
import java.util.*;
//import java.util.Math.*;

public class Main {
    public static void main(String[] args) throws Exception {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int A[] = new int[n];
    int i;
    int count = 0;
    
    for(i = 0; i < n; i++){
        A[i] = sc.nextInt();
//        System.out.println(isprime(A[i]));
        if(isprime(A[i]) == true){
            count++;
        }
    }
 
    System.out.println(count);
    
    }
    
    public static boolean isprime(int x){
        int i = 0;
       // System.out.println(x);
        if(x == 2){
            return true;
        }else if((x % 2) == 0){
            return false;
        }else{
            i = 3;
            while(i <= Math.sqrt(x)){
                if((x % i) == 0){
                    return false;
                }
                i = i + 2;
            }
        }
        return true;
    }
}

