import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    /**
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException,
            IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in));

        int len = Integer.parseInt(reader.readLine());
        int[] arr = new int[len];

        String line;

        for (int i = 0; i < len; i++) {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        }
        
        int resultCount = 0;
        for (int j = 0; j < arr.length; j++) {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        }

        System.out.println(resultCount);

    }

    
//  ??????function prime(n) {
//  ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;
//  ????????????for(i=3; i<=Math.sqrt(n); i++) {
//  ??????????????????if ((n % i) == 0) return 0;
//  ????????????}
//  ????????????return 1;
//  ??????}
    private static boolean isPrime(int value) {

        if(value == 2) return true;
        if(value ==  3) return true;
        if(value ==  5) return true;
        if(value ==  7) return true;
        
        if(value % 2 == 0) return false;
        if(value % 3 == 0) return false;
        if(value % 5 == 0) return false;
        if(value % 7 == 0) return false;

        int max = (int) Math.sqrt(value);
        
        
        for (double i = 8; i <= max; i ++ ) {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        }
        
        return true;
    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    /**
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException,
            IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in));

        int len = Integer.parseInt(reader.readLine());
        int[] arr = new int[len];

        String line;

        for (int i = 0; i < len; i++) {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        }
        
        int resultCount = 0;
        for (int j = 0; j < arr.length; j++) {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        }

        System.out.println(resultCount);

    }

    
//  ??????function prime(n) {
//  ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;
//  ????????????for(i=3; i<=Math.sqrt(n); i++) {
//  ??????????????????if ((n % i) == 0) return 0;
//  ????????????}
//  ????????????return 1;
//  ??????}
    private static boolean isPrime(int value) {

        if(value == 2) return true;
        if(value ==  3) return true;
        if(value ==  5) return true;
        if(value ==  7) return true;
        
        if(value % 2 == 0) return false;
        if(value % 3 == 0) return false;
        if(value % 5 == 0) return false;
        if(value % 7 == 0) return false;

        int max = (int) Math.sqrt(value);
        
        
        for (double i = 8; i <= max; i ++ ) {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        }
        
        return true;
    }

} Main /**
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException,
            IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in));

        int len = Integer.parseInt(reader.readLine());
        int[] arr = new int[len];

        String line;

        for (int i = 0; i < len; i++) {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        }
        
        int resultCount = 0;
        for (int j = 0; j < arr.length; j++) {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        }

        System.out.println(resultCount);

    } main {

        BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in));

        int len = Integer.parseInt(reader.readLine());
        int[] arr = new int[len];

        String line;

        for (int i = 0; i < len; i++) {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        }
        
        int resultCount = 0;
        for (int j = 0; j < arr.length; j++) {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        }

        System.out.println(resultCount);

    } BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in)); reader new BufferedReader(new InputStreamReader(
                System.in)) int len = Integer.parseInt(reader.readLine()); len Integer.parseInt(reader.readLine()) Integer.parseInt Integer reader.readLine() reader.readLine reader int[] arr = new int[len]; arr new int[len] len String line; line for (int i = 0; i < len; i++) {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        } int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        } {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        } line = reader.readLine() line reader.readLine() reader.readLine reader arr[i] = Integer.parseInt(line) arr[i] arr i Integer.parseInt(line) Integer.parseInt Integer line int resultCount = 0; resultCount 0 for (int j = 0; j < arr.length; j++) {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        } int j = 0; int j = 0; j 0 j < arr.length j arr.length arr arr.length j++ j++ j {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        } {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        } if (isPrime(arr[j])) {
                resultCount++;
            } isPrime(arr[j]) isPrime arr[j] arr j {
                resultCount++;
            } resultCount++ resultCount System.out.println(resultCount) System.out.println System.out System System.out resultCount String[] args args //  ??????function prime(n) {
//  ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;
//  ????????????for(i=3; i<=Math.sqrt(n); i++) {
//  ??????????????????if ((n % i) == 0) return 0;
//  ????????????}
//  ????????????return 1;
//  ??????}
    private static boolean isPrime(int value) {

        if(value == 2) return true;
        if(value ==  3) return true;
        if(value ==  5) return true;
        if(value ==  7) return true;
        
        if(value % 2 == 0) return false;
        if(value % 3 == 0) return false;
        if(value % 5 == 0) return false;
        if(value % 7 == 0) return false;

        int max = (int) Math.sqrt(value);
        
        
        for (double i = 8; i <= max; i ++ ) {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        }
        
        return true;
    } isPrime {

        if(value == 2) return true;
        if(value ==  3) return true;
        if(value ==  5) return true;
        if(value ==  7) return true;
        
        if(value % 2 == 0) return false;
        if(value % 3 == 0) return false;
        if(value % 5 == 0) return false;
        if(value % 7 == 0) return false;

        int max = (int) Math.sqrt(value);
        
        
        for (double i = 8; i <= max; i ++ ) {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        }
        
        return true;
    } if(value == 2) return true; value == 2 value 2 return true; true if(value ==  3) return true; value ==  3 value 3 return true; true if(value ==  5) return true; value ==  5 value 5 return true; true if(value ==  7) return true; value ==  7 value 7 return true; true if(value % 2 == 0) return false; value % 2 == 0 value % 2 value 2 0 return false; false if(value % 3 == 0) return false; value % 3 == 0 value % 3 value 3 0 return false; false if(value % 5 == 0) return false; value % 5 == 0 value % 5 value 5 0 return false; false if(value % 7 == 0) return false; value % 7 == 0 value % 7 value 7 0 return false; false int max = (int) Math.sqrt(value); max (int) Math.sqrt(value) Math.sqrt Math value for (double i = 8; i <= max; i ++ ) {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        } double i = 8; double i = 8; i 8 i <= max i max i ++ i ++ i {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        } {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        } if (value % i == 0) return false; value % i == 0 value % i value i 0 return false; false return true; true int value value public class Main {

    /**
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException,
            IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in));

        int len = Integer.parseInt(reader.readLine());
        int[] arr = new int[len];

        String line;

        for (int i = 0; i < len; i++) {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        }
        
        int resultCount = 0;
        for (int j = 0; j < arr.length; j++) {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        }

        System.out.println(resultCount);

    }

    
//  ??????function prime(n) {
//  ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;
//  ????????????for(i=3; i<=Math.sqrt(n); i++) {
//  ??????????????????if ((n % i) == 0) return 0;
//  ????????????}
//  ????????????return 1;
//  ??????}
    private static boolean isPrime(int value) {

        if(value == 2) return true;
        if(value ==  3) return true;
        if(value ==  5) return true;
        if(value ==  7) return true;
        
        if(value % 2 == 0) return false;
        if(value % 3 == 0) return false;
        if(value % 5 == 0) return false;
        if(value % 7 == 0) return false;

        int max = (int) Math.sqrt(value);
        
        
        for (double i = 8; i <= max; i ++ ) {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        }
        
        return true;
    }

} public class Main {

    /**
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException,
            IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in));

        int len = Integer.parseInt(reader.readLine());
        int[] arr = new int[len];

        String line;

        for (int i = 0; i < len; i++) {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        }
        
        int resultCount = 0;
        for (int j = 0; j < arr.length; j++) {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        }

        System.out.println(resultCount);

    }

    
//  ??????function prime(n) {
//  ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;
//  ????????????for(i=3; i<=Math.sqrt(n); i++) {
//  ??????????????????if ((n % i) == 0) return 0;
//  ????????????}
//  ????????????return 1;
//  ??????}
    private static boolean isPrime(int value) {

        if(value == 2) return true;
        if(value ==  3) return true;
        if(value ==  5) return true;
        if(value ==  7) return true;
        
        if(value % 2 == 0) return false;
        if(value % 3 == 0) return false;
        if(value % 5 == 0) return false;
        if(value % 7 == 0) return false;

        int max = (int) Math.sqrt(value);
        
        
        for (double i = 8; i <= max; i ++ ) {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        }
        
        return true;
    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    /**
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException,
            IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in));

        int len = Integer.parseInt(reader.readLine());
        int[] arr = new int[len];

        String line;

        for (int i = 0; i < len; i++) {
            line = reader.readLine();
            arr[i] = Integer.parseInt(line);
        }
        
        int resultCount = 0;
        for (int j = 0; j < arr.length; j++) {
            if (isPrime(arr[j])) {
                resultCount++;
            }
        }

        System.out.println(resultCount);

    }

    
//  ??????function prime(n) {
//  ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;
//  ????????????for(i=3; i<=Math.sqrt(n); i++) {
//  ??????????????????if ((n % i) == 0) return 0;
//  ????????????}
//  ????????????return 1;
//  ??????}
    private static boolean isPrime(int value) {

        if(value == 2) return true;
        if(value ==  3) return true;
        if(value ==  5) return true;
        if(value ==  7) return true;
        
        if(value % 2 == 0) return false;
        if(value % 3 == 0) return false;
        if(value % 5 == 0) return false;
        if(value % 7 == 0) return false;

        int max = (int) Math.sqrt(value);
        
        
        for (double i = 8; i <= max; i ++ ) {
//            System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
            if (value % i == 0) return false;
        }
        
        return true;
    }

}