import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
 *
 * @author Y
 */
public 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 a;
        int c = 0;
        
        for(int i=0 ; i<N; i++){
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        }
        System.out.println(c);
        
        
        
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public 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 a;
        int c = 0;
        
        for(int i=0 ; i<N; i++){
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        }
        System.out.println(c);
        
        
        
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(br.readLine());
        int a;
        int c = 0;
        
        for(int i=0 ; i<N; i++){
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        }
        System.out.println(c);
        
        
        
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(br.readLine());
        int a;
        int c = 0;
        
        for(int i=0 ; i<N; i++){
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        }
        System.out.println(c);
        
        
        
    } 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 a; a int c = 0; c 0 for(int i=0 ; i<N; i++){
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        } int i=0 ; int i=0 ; i 0 i<N i N i++ i++ i {
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        } {
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        } a = Integer.parseInt(br.readLine()) a Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            } a%2==0 a%2 a 2 0 {
                if(a==2) c++;
            } if(a==2) c++; a==2 a 2 c++ c if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            } a%3==0 a%3 a 3 0 {
                if(a==3) c++;
            } if(a==3) c++; a==3 a 3 c++ c if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            } a%7==0 a%7 a 7 0 {
                if(a==7) c++;
            } if(a==7) c++; a==7 a 7 c++ c {
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            } for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                } int j = 2; int j = 2; j 2 j<=Math.sqrt(a) j Math.sqrt(a) Math.sqrt Math a j++ j++ j {
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                } {
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                } if(a%j == 0) break; a%j == 0 a%j a j 0 break; if(j == Math.floor(Math.sqrt(a))) c++; j == Math.floor(Math.sqrt(a)) j Math.floor(Math.sqrt(a)) Math.floor Math Math.sqrt(a) Math.sqrt Math a c++ c System.out.println(c) System.out.println System.out System System.out c String[] args args public 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 a;
        int c = 0;
        
        for(int i=0 ; i<N; i++){
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        }
        System.out.println(c);
        
        
        
    }
} public 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 a;
        int c = 0;
        
        for(int i=0 ; i<N; i++){
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        }
        System.out.println(c);
        
        
        
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
 *
 * @author Y
 */
public 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 a;
        int c = 0;
        
        for(int i=0 ; i<N; i++){
            a = Integer.parseInt(br.readLine());
            
            if(a%2==0){
                if(a==2) c++;
            }else if(a%3==0){
                if(a==3) c++;
            }else if(a%7==0){
                if(a==7) c++;
            }else{
                for(int j = 2;j<=Math.sqrt(a);j++){
                    if(a%j == 0) break; 
                    if(j == Math.floor(Math.sqrt(a))) c++;
                }
            }  
        }
        System.out.println(c);
        
        
        
    }
}