import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int num = Integer.parseInt(sc.nextLine());

        int result = 0;

        for (int i = 0; i < num; i++) {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        }

        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int num = Integer.parseInt(sc.nextLine());

        int result = 0;

        for (int i = 0; i < num; i++) {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        }

        System.out.println(result);
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int num = Integer.parseInt(sc.nextLine());

        int result = 0;

        for (int i = 0; i < num; i++) {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        }

        System.out.println(result);
    } main {

        Scanner sc = new Scanner(System.in);

        int num = Integer.parseInt(sc.nextLine());

        int result = 0;

        for (int i = 0; i < num; i++) {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        }

        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = Integer.parseInt(sc.nextLine()); num Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int result = 0; result 0 for (int i = 0; i < num; i++) {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        } {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        } int target = Integer.parseInt(sc.nextLine()); target Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc if (target == 1) { continue; } target == 1 target 1 { continue; } continue; boolean flgPrime = true; flgPrime true for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            } int j = 2; int j = 2; j 2 j <= (int)Math.sqrt(target) j (int)Math.sqrt(target) Math.sqrt Math target j++ j++ j {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            } {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            } if (target % j == 0) {
                    flgPrime = false;
                    break;
                } target % j == 0 target % j target j 0 {
                    flgPrime = false;
                    break;
                } flgPrime = false flgPrime false break; if (flgPrime) {
                result++;
            } flgPrime {
                result++;
            } result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int num = Integer.parseInt(sc.nextLine());

        int result = 0;

        for (int i = 0; i < num; i++) {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        }

        System.out.println(result);
    }
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int num = Integer.parseInt(sc.nextLine());

        int result = 0;

        for (int i = 0; i < num; i++) {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        }

        System.out.println(result);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int num = Integer.parseInt(sc.nextLine());

        int result = 0;

        for (int i = 0; i < num; i++) {
            int target = Integer.parseInt(sc.nextLine());

            if (target == 1) { continue; }

            boolean flgPrime = true;
            for(int j = 2; j <= (int)Math.sqrt(target); j++) {
                if (target % j == 0) {
                    flgPrime = false;
                    break;
                }
            }

            if (flgPrime) {
                result++;
            }
        }

        System.out.println(result);
    }
}
