import java.io.*;

class Main{
    
        public static int prime(int x){
            int k = 0;
            if(x == 1){
                k = 1;
            }else if(x % 2 == 0){
                k = 1;
            }
            for(int i = 3; i <= Math.sqrt(x); i += 2){
                if (x % i == 0){
                    k = 1;
                    break;
                }
            }
            if(x == 2){
                k = 0;
            }
                return k;
        }

    public static void main(String[] args){

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                    int N = Integer.parseInt(reader.readLine());;
                    

                    int[] a = new int[N];

                    for(int i = 0; i < N; i ++){
                        a[i] = Integer.parseInt(reader.readLine());
                    }

                    int count = 0;

                    for(int i = 0; i < a.length; i++){
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    }

                    System.out.println(count);
                            
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    }
} import java.io.*; io.* java class Main{
    
        public static int prime(int x){
            int k = 0;
            if(x == 1){
                k = 1;
            }else if(x % 2 == 0){
                k = 1;
            }
            for(int i = 3; i <= Math.sqrt(x); i += 2){
                if (x % i == 0){
                    k = 1;
                    break;
                }
            }
            if(x == 2){
                k = 0;
            }
                return k;
        }

    public static void main(String[] args){

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                    int N = Integer.parseInt(reader.readLine());;
                    

                    int[] a = new int[N];

                    for(int i = 0; i < N; i ++){
                        a[i] = Integer.parseInt(reader.readLine());
                    }

                    int count = 0;

                    for(int i = 0; i < a.length; i++){
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    }

                    System.out.println(count);
                            
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    }
} Main public static int prime(int x){
            int k = 0;
            if(x == 1){
                k = 1;
            }else if(x % 2 == 0){
                k = 1;
            }
            for(int i = 3; i <= Math.sqrt(x); i += 2){
                if (x % i == 0){
                    k = 1;
                    break;
                }
            }
            if(x == 2){
                k = 0;
            }
                return k;
        } prime {
            int k = 0;
            if(x == 1){
                k = 1;
            }else if(x % 2 == 0){
                k = 1;
            }
            for(int i = 3; i <= Math.sqrt(x); i += 2){
                if (x % i == 0){
                    k = 1;
                    break;
                }
            }
            if(x == 2){
                k = 0;
            }
                return k;
        } int k = 0; k 0 if(x == 1){
                k = 1;
            }else if(x % 2 == 0){
                k = 1;
            } x == 1 x 1 {
                k = 1;
            } k = 1 k 1 if(x % 2 == 0){
                k = 1;
            } x % 2 == 0 x % 2 x 2 0 {
                k = 1;
            } k = 1 k 1 for(int i = 3; i <= Math.sqrt(x); i += 2){
                if (x % i == 0){
                    k = 1;
                    break;
                }
            } int i = 3; int i = 3; i 3 i <= Math.sqrt(x) i Math.sqrt(x) Math.sqrt Math x i += 2 i += 2 i 2 {
                if (x % i == 0){
                    k = 1;
                    break;
                }
            } {
                if (x % i == 0){
                    k = 1;
                    break;
                }
            } if (x % i == 0){
                    k = 1;
                    break;
                } x % i == 0 x % i x i 0 {
                    k = 1;
                    break;
                } k = 1 k 1 break; if(x == 2){
                k = 0;
            } x == 2 x 2 {
                k = 0;
            } k = 0 k 0 return k; k int x x public static void main(String[] args){

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                    int N = Integer.parseInt(reader.readLine());;
                    

                    int[] a = new int[N];

                    for(int i = 0; i < N; i ++){
                        a[i] = Integer.parseInt(reader.readLine());
                    }

                    int count = 0;

                    for(int i = 0; i < a.length; i++){
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    }

                    System.out.println(count);
                            
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    } main {

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                    int N = Integer.parseInt(reader.readLine());;
                    

                    int[] a = new int[N];

                    for(int i = 0; i < N; i ++){
                        a[i] = Integer.parseInt(reader.readLine());
                    }

                    int count = 0;

                    for(int i = 0; i < a.length; i++){
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    }

                    System.out.println(count);
                            
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) try {       
                    int N = Integer.parseInt(reader.readLine());;
                    

                    int[] a = new int[N];

                    for(int i = 0; i < N; i ++){
                        a[i] = Integer.parseInt(reader.readLine());
                    }

                    int count = 0;

                    for(int i = 0; i < a.length; i++){
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    }

                    System.out.println(count);
                            
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        } IOException e {
            //TODO: handle exception
            System.out.println(e);
        } System.out.println(e) System.out.println System.out System System.out e {       
                    int N = Integer.parseInt(reader.readLine());;
                    

                    int[] a = new int[N];

                    for(int i = 0; i < N; i ++){
                        a[i] = Integer.parseInt(reader.readLine());
                    }

                    int count = 0;

                    for(int i = 0; i < a.length; i++){
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    }

                    System.out.println(count);
                            
        } int N = Integer.parseInt(reader.readLine()); N Integer.parseInt(reader.readLine()) Integer.parseInt Integer reader.readLine() reader.readLine reader int[] a = new int[N]; a new int[N] N for(int i = 0; i < N; i ++){
                        a[i] = Integer.parseInt(reader.readLine());
                    } int i = 0; int i = 0; i 0 i < N i N i ++ i ++ i {
                        a[i] = Integer.parseInt(reader.readLine());
                    } {
                        a[i] = Integer.parseInt(reader.readLine());
                    } a[i] = Integer.parseInt(reader.readLine()) a[i] a i Integer.parseInt(reader.readLine()) Integer.parseInt Integer reader.readLine() reader.readLine reader int count = 0; count 0 for(int i = 0; i < a.length; i++){
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    } {
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    } if(prime(a[i]) == 0){
                            count += 1;
                        } prime(a[i]) == 0 prime(a[i]) prime a[i] a i 0 {
                            count += 1;
                        } count += 1 count 1 System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.io.*;

class Main{
    
        public static int prime(int x){
            int k = 0;
            if(x == 1){
                k = 1;
            }else if(x % 2 == 0){
                k = 1;
            }
            for(int i = 3; i <= Math.sqrt(x); i += 2){
                if (x % i == 0){
                    k = 1;
                    break;
                }
            }
            if(x == 2){
                k = 0;
            }
                return k;
        }

    public static void main(String[] args){

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                    int N = Integer.parseInt(reader.readLine());;
                    

                    int[] a = new int[N];

                    for(int i = 0; i < N; i ++){
                        a[i] = Integer.parseInt(reader.readLine());
                    }

                    int count = 0;

                    for(int i = 0; i < a.length; i++){
                        if(prime(a[i]) == 0){
                            count += 1;
                        }
                    }

                    System.out.println(count);
                            
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    }
}