import java.io.*;
    
class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int i, j;
        int count = 0;
    
        for(i=0; i<n; i++){
            int a = Integer.parseInt(br.readLine());
            for(j=2; (j*j)<=a; j++){
                if(a%j == 0) break;
            }
            if((j*j)>a) count++;
        }
        System.out.println(count);
    }
} import java.io.*; io.* java class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int i, j;
        int count = 0;
    
        for(i=0; i<n; i++){
            int a = Integer.parseInt(br.readLine());
            for(j=2; (j*j)<=a; j++){
                if(a%j == 0) break;
            }
            if((j*j)>a) count++;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int i, j;
        int count = 0;
    
        for(i=0; i<n; i++){
            int a = Integer.parseInt(br.readLine());
            for(j=2; (j*j)<=a; j++){
                if(a%j == 0) break;
            }
            if((j*j)>a) count++;
        }
        System.out.println(count);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int i, j;
        int count = 0;
    
        for(i=0; i<n; i++){
            int a = Integer.parseInt(br.readLine());
            for(j=2; (j*j)<=a; j++){
                if(a%j == 0) break;
            }
            if((j*j)>a) count++;
        }
        System.out.println(count);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int i i j; j int count = 0; count 0 for(i=0; i<n; i++){
            int a = Integer.parseInt(br.readLine());
            for(j=2; (j*j)<=a; j++){
                if(a%j == 0) break;
            }
            if((j*j)>a) count++;
        } i=0; i=0 i 0 i<n i n i++ i++ i {
            int a = Integer.parseInt(br.readLine());
            for(j=2; (j*j)<=a; j++){
                if(a%j == 0) break;
            }
            if((j*j)>a) count++;
        } {
            int a = Integer.parseInt(br.readLine());
            for(j=2; (j*j)<=a; j++){
                if(a%j == 0) break;
            }
            if((j*j)>a) count++;
        } int a = Integer.parseInt(br.readLine()); a Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(j=2; (j*j)<=a; j++){
                if(a%j == 0) break;
            } j=2; j=2 j 2 (j*j)<=a (j*j) j j a j++ j++ j {
                if(a%j == 0) break;
            } {
                if(a%j == 0) break;
            } if(a%j == 0) break; a%j == 0 a%j a j 0 break; if((j*j)>a) count++; (j*j)>a (j*j) j j a count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.io.*;
    
class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int i, j;
        int count = 0;
    
        for(i=0; i<n; i++){
            int a = Integer.parseInt(br.readLine());
            for(j=2; (j*j)<=a; j++){
                if(a%j == 0) break;
            }
            if((j*j)>a) count++;
        }
        System.out.println(count);
    }
}