import java.util.Scanner;

class Main {
    public static void main (String[] args) {
        final Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        int[] numbers = new int[length];

        int max = 0;
        int count = 0;
        for (int i = 0; i < length; i++) {
            numbers[i] = sc.nextInt();
            if (numbers[i] == 2) {
                count++;
            }
        }

        for (int number : numbers) {

            boolean flg = true;
            if (number % 2 == 0) {
              continue;
            }

            for (int i = 3; i <= Math.sqrt(number); i += 2) {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            }

            if (flg){
              count++;
            }

        }

        System.out.println(count);
    }
}
 import java.util.Scanner; Scanner java.util class Main {
    public static void main (String[] args) {
        final Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        int[] numbers = new int[length];

        int max = 0;
        int count = 0;
        for (int i = 0; i < length; i++) {
            numbers[i] = sc.nextInt();
            if (numbers[i] == 2) {
                count++;
            }
        }

        for (int number : numbers) {

            boolean flg = true;
            if (number % 2 == 0) {
              continue;
            }

            for (int i = 3; i <= Math.sqrt(number); i += 2) {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            }

            if (flg){
              count++;
            }

        }

        System.out.println(count);
    }
} Main public static void main (String[] args) {
        final Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        int[] numbers = new int[length];

        int max = 0;
        int count = 0;
        for (int i = 0; i < length; i++) {
            numbers[i] = sc.nextInt();
            if (numbers[i] == 2) {
                count++;
            }
        }

        for (int number : numbers) {

            boolean flg = true;
            if (number % 2 == 0) {
              continue;
            }

            for (int i = 3; i <= Math.sqrt(number); i += 2) {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            }

            if (flg){
              count++;
            }

        }

        System.out.println(count);
    } main {
        final Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        int[] numbers = new int[length];

        int max = 0;
        int count = 0;
        for (int i = 0; i < length; i++) {
            numbers[i] = sc.nextInt();
            if (numbers[i] == 2) {
                count++;
            }
        }

        for (int number : numbers) {

            boolean flg = true;
            if (number % 2 == 0) {
              continue;
            }

            for (int i = 3; i <= Math.sqrt(number); i += 2) {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            }

            if (flg){
              count++;
            }

        }

        System.out.println(count);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int length = sc.nextInt(); length sc.nextInt() sc.nextInt sc int[] numbers = new int[length]; numbers new int[length] length int max = 0; max 0 int count = 0; count 0 for (int i = 0; i < length; i++) {
            numbers[i] = sc.nextInt();
            if (numbers[i] == 2) {
                count++;
            }
        } int i = 0; int i = 0; i 0 i < length i length i++ i++ i {
            numbers[i] = sc.nextInt();
            if (numbers[i] == 2) {
                count++;
            }
        } {
            numbers[i] = sc.nextInt();
            if (numbers[i] == 2) {
                count++;
            }
        } numbers[i] = sc.nextInt() numbers[i] numbers i sc.nextInt() sc.nextInt sc if (numbers[i] == 2) {
                count++;
            } numbers[i] == 2 numbers[i] numbers i 2 {
                count++;
            } count++ count for (int number : numbers) {

            boolean flg = true;
            if (number % 2 == 0) {
              continue;
            }

            for (int i = 3; i <= Math.sqrt(number); i += 2) {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            }

            if (flg){
              count++;
            }

        } int number numbers {

            boolean flg = true;
            if (number % 2 == 0) {
              continue;
            }

            for (int i = 3; i <= Math.sqrt(number); i += 2) {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            }

            if (flg){
              count++;
            }

        } {

            boolean flg = true;
            if (number % 2 == 0) {
              continue;
            }

            for (int i = 3; i <= Math.sqrt(number); i += 2) {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            }

            if (flg){
              count++;
            }

        } boolean flg = true; flg true if (number % 2 == 0) {
              continue;
            } number % 2 == 0 number % 2 number 2 0 {
              continue;
            } continue; for (int i = 3; i <= Math.sqrt(number); i += 2) {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            } int i = 3; int i = 3; i 3 i <= Math.sqrt(number) i Math.sqrt(number) Math.sqrt Math number i += 2 i += 2 i 2 {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            } {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            } if (number % i == 0) {
                    flg = false;
                    break;
                } number % i == 0 number % i number i 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
import java.util.Scanner;

class Main {
    public static void main (String[] args) {
        final Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        int[] numbers = new int[length];

        int max = 0;
        int count = 0;
        for (int i = 0; i < length; i++) {
            numbers[i] = sc.nextInt();
            if (numbers[i] == 2) {
                count++;
            }
        }

        for (int number : numbers) {

            boolean flg = true;
            if (number % 2 == 0) {
              continue;
            }

            for (int i = 3; i <= Math.sqrt(number); i += 2) {
                if (number % i == 0) {
                    flg = false;
                    break;
                }
            }

            if (flg){
              count++;
            }

        }

        System.out.println(count);
    }
}

