import java.util.Scanner;

public class Main {
    public static Scanner sc;
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = 0;
        for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        }
        System.out.println(res);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static Scanner sc;
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = 0;
        for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        }
        System.out.println(res);
    }
} Main public static Scanner sc; sc public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = 0;
        for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        }
        System.out.println(res);
    } main {
        sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = 0;
        for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        }
        System.out.println(res);
    } sc = new Scanner(System.in) sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int res = 0; res 0 for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        } {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if (num == 2 || num == 3) {
                res++;
                continue;
            } num == 2 || num == 3 num == 2 num 2 num == 3 num 3 {
                res++;
                continue;
            } res++ res continue; boolean b = true; b true for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            } int j = 2; int j = 2; j 2 j*j <= num j*j j j num j++ j++ j {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            } {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            } if (num%j == 0) {
                    b = false;
                    break;
                } num%j == 0 num%j num j 0 {
                    b = false;
                    break;
                } b = false b false break; if (b) res++; b res++ res System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static Scanner sc;
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = 0;
        for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        }
        System.out.println(res);
    }
} public class Main {
    public static Scanner sc;
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = 0;
        for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        }
        System.out.println(res);
    }
} Main
import java.util.Scanner;

public class Main {
    public static Scanner sc;
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = 0;
        for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (num == 2 || num == 3) {
                res++;
                continue;
            }
            boolean b = true;
            for (int j = 2; j*j <= num; j++) {
                if (num%j == 0) {
                    b = false;
                    break;
                }
            }
            if (b) res++;
        }
        System.out.println(res);
    }
}