import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt(); //整数の数
    int[] x = new int[n];
    for (int i=0; i<n; i++) {
        x[i] = sc.nextInt();
    }
    int count = 0; //素数の数
    for (int a:x) {
        if(prime(a)) count++;
    }
    System.out.println(count); //最大公約数を出力
    }

    /**
     * 素数判定
     */
     public static boolean prime(int x) {
            for (int i=2; i<=Math.sqrt(x); i++) {
                if (x%i==0) return false;
            }
            return true;
     }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt(); //整数の数
    int[] x = new int[n];
    for (int i=0; i<n; i++) {
        x[i] = sc.nextInt();
    }
    int count = 0; //素数の数
    for (int a:x) {
        if(prime(a)) count++;
    }
    System.out.println(count); //最大公約数を出力
    }

    /**
     * 素数判定
     */
     public static boolean prime(int x) {
            for (int i=2; i<=Math.sqrt(x); i++) {
                if (x%i==0) return false;
            }
            return true;
     }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt(); //整数の数
    int[] x = new int[n];
    for (int i=0; i<n; i++) {
        x[i] = sc.nextInt();
    }
    int count = 0; //素数の数
    for (int a:x) {
        if(prime(a)) count++;
    }
    System.out.println(count); //最大公約数を出力
    } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt(); //整数の数
    int[] x = new int[n];
    for (int i=0; i<n; i++) {
        x[i] = sc.nextInt();
    }
    int count = 0; //素数の数
    for (int a:x) {
        if(prime(a)) count++;
    }
    System.out.println(count); //最大公約数を出力
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] x = new int[n]; x new int[n] n for (int i=0; i<n; i++) {
        x[i] = sc.nextInt();
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        x[i] = sc.nextInt();
    } {
        x[i] = sc.nextInt();
    } x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int a:x) {
        if(prime(a)) count++;
    } int a x {
        if(prime(a)) count++;
    } {
        if(prime(a)) count++;
    } if(prime(a)) count++; prime(a) prime a count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args /**
     * 素数判定
     */
     public static boolean prime(int x) {
            for (int i=2; i<=Math.sqrt(x); i++) {
                if (x%i==0) return false;
            }
            return true;
     } prime {
            for (int i=2; i<=Math.sqrt(x); i++) {
                if (x%i==0) return false;
            }
            return true;
     } for (int i=2; i<=Math.sqrt(x); i++) {
                if (x%i==0) return false;
            } int i=2; int i=2; i 2 i<=Math.sqrt(x) i Math.sqrt(x) Math.sqrt Math x i++ i++ i {
                if (x%i==0) return false;
            } {
                if (x%i==0) return false;
            } if (x%i==0) return false; x%i==0 x%i x i 0 return false; false return true; true int x x public class Main {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt(); //整数の数
    int[] x = new int[n];
    for (int i=0; i<n; i++) {
        x[i] = sc.nextInt();
    }
    int count = 0; //素数の数
    for (int a:x) {
        if(prime(a)) count++;
    }
    System.out.println(count); //最大公約数を出力
    }

    /**
     * 素数判定
     */
     public static boolean prime(int x) {
            for (int i=2; i<=Math.sqrt(x); i++) {
                if (x%i==0) return false;
            }
            return true;
     }
} public class Main {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt(); //整数の数
    int[] x = new int[n];
    for (int i=0; i<n; i++) {
        x[i] = sc.nextInt();
    }
    int count = 0; //素数の数
    for (int a:x) {
        if(prime(a)) count++;
    }
    System.out.println(count); //最大公約数を出力
    }

    /**
     * 素数判定
     */
     public static boolean prime(int x) {
            for (int i=2; i<=Math.sqrt(x); i++) {
                if (x%i==0) return false;
            }
            return true;
     }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt(); //整数の数
    int[] x = new int[n];
    for (int i=0; i<n; i++) {
        x[i] = sc.nextInt();
    }
    int count = 0; //素数の数
    for (int a:x) {
        if(prime(a)) count++;
    }
    System.out.println(count); //最大公約数を出力
    }

    /**
     * 素数判定
     */
     public static boolean prime(int x) {
            for (int i=2; i<=Math.sqrt(x); i++) {
                if (x%i==0) return false;
            }
            return true;
     }
}
