import java.util.Scanner;

public class Main {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int count = 0;
        for (int i = 0; i < n; i++) {
            if (isPrimeNumber(sc.nextInt())) {
                count++;
            }
        }
        System.out.println(count);
    }

    private static boolean isPrimeNumber(int num) {
        double max = Math.sqrt(num);
        for (int i = 2; i <= max; i++) {
            if (num % i == 0) return false;
        }
        return true;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int count = 0;
        for (int i = 0; i < n; i++) {
            if (isPrimeNumber(sc.nextInt())) {
                count++;
            }
        }
        System.out.println(count);
    }

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

    public static void main(String[] args) {
        int n = sc.nextInt();
        int count = 0;
        for (int i = 0; i < n; i++) {
            if (isPrimeNumber(sc.nextInt())) {
                count++;
            }
        }
        System.out.println(count);
    }

    private static boolean isPrimeNumber(int num) {
        double max = Math.sqrt(num);
        for (int i = 2; i <= max; i++) {
            if (num % i == 0) return false;
        }
        return true;
    }
} public class Main {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int count = 0;
        for (int i = 0; i < n; i++) {
            if (isPrimeNumber(sc.nextInt())) {
                count++;
            }
        }
        System.out.println(count);
    }

    private static boolean isPrimeNumber(int num) {
        double max = Math.sqrt(num);
        for (int i = 2; i <= max; i++) {
            if (num % i == 0) return false;
        }
        return true;
    }
} Main
import java.util.Scanner;

public class Main {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int count = 0;
        for (int i = 0; i < n; i++) {
            if (isPrimeNumber(sc.nextInt())) {
                count++;
            }
        }
        System.out.println(count);
    }

    private static boolean isPrimeNumber(int num) {
        double max = Math.sqrt(num);
        for (int i = 2; i <= max; i++) {
            if (num % i == 0) return false;
        }
        return true;
    }
}
