
import java.util.Scanner;

public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int num = sc.nextInt();
        int count = 0;
        for(int i = 0; i < num; i++){
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        }
        System.out.println(count);
    }
    
} import java.util.Scanner; Scanner java.util public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int num = sc.nextInt();
        int count = 0;
        for(int i = 0; i < num; i++){
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        }
        System.out.println(count);
    }
    
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        int num = sc.nextInt();
        int count = 0;
        for(int i = 0; i < num; i++){
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        }
        System.out.println(count);
    } main {
        int num = sc.nextInt();
        int count = 0;
        for(int i = 0; i < num; i++){
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        }
        System.out.println(count);
    } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int i = 0; i < num; i++){
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        } {
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean flg = true; flg true for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            } int j = 2; int j = 2; j 2 j <= Math.sqrt(n) j Math.sqrt(n) Math.sqrt Math n j++ j++ j {
                if(n % j == 0){
                    flg = false;
                    break;
                }
            } {
                if(n % j == 0){
                    flg = false;
                    break;
                }
            } if(n % j == 0){
                    flg = false;
                    break;
                } n % j == 0 n % j n j 0 {
                    flg = false;
                    break;
                } flg = false flg false break; if(flg){
                count++;
            } flg {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int num = sc.nextInt();
        int count = 0;
        for(int i = 0; i < num; i++){
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        }
        System.out.println(count);
    }
    
} public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int num = sc.nextInt();
        int count = 0;
        for(int i = 0; i < num; i++){
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        }
        System.out.println(count);
    }
    
} Main

import java.util.Scanner;

public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int num = sc.nextInt();
        int count = 0;
        for(int i = 0; i < num; i++){
            int n = sc.nextInt();
            boolean flg = true;
            for(int j = 2; j <= Math.sqrt(n); j++){
                if(n % j == 0){
                    flg = false;
                    break;
                }
            }
            if(flg){
                count++;
            }
        }
        System.out.println(count);
    }
    
}
