import java.util.Scanner;

class Main {

    private static boolean isPrime(int n){
        int sqrt = (int) Math.sqrt(n) + 1;
        
        for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false;

        return true;
    }


    public static void main(String[] args) throws Exception{

        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();

        int ans = 0;

        while (sc.hasNextInt())
            if (isPrime(sc.nextInt()))
                ans++;

        System.out.println(ans);
    }
}
 import java.util.Scanner; Scanner java.util class Main {

    private static boolean isPrime(int n){
        int sqrt = (int) Math.sqrt(n) + 1;
        
        for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false;

        return true;
    }


    public static void main(String[] args) throws Exception{

        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();

        int ans = 0;

        while (sc.hasNextInt())
            if (isPrime(sc.nextInt()))
                ans++;

        System.out.println(ans);
    }
} Main private static boolean isPrime(int n){
        int sqrt = (int) Math.sqrt(n) + 1;
        
        for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false;

        return true;
    } isPrime {
        int sqrt = (int) Math.sqrt(n) + 1;
        
        for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false;

        return true;
    } int sqrt = (int) Math.sqrt(n) + 1; sqrt (int) Math.sqrt(n) + 1 (int) Math.sqrt(n) Math.sqrt Math n 1 for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false; int i = 2; int i = 2; i 2 i < sqrt i sqrt i++ i++ i if (n % i == 0)
                return false; if (n % i == 0)
                return false; n % i == 0 n % i n i 0 return false; false return true; true int n n public static void main(String[] args) throws Exception{

        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();

        int ans = 0;

        while (sc.hasNextInt())
            if (isPrime(sc.nextInt()))
                ans++;

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

        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();

        int ans = 0;

        while (sc.hasNextInt())
            if (isPrime(sc.nextInt()))
                ans++;

        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int length = sc.nextInt(); length sc.nextInt() sc.nextInt sc int ans = 0; ans 0 while (sc.hasNextInt())
            if (isPrime(sc.nextInt()))
                ans++; sc.hasNextInt() sc.hasNextInt sc if (isPrime(sc.nextInt()))
                ans++; isPrime(sc.nextInt()) isPrime sc.nextInt() sc.nextInt sc ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Scanner;

class Main {

    private static boolean isPrime(int n){
        int sqrt = (int) Math.sqrt(n) + 1;
        
        for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false;

        return true;
    }


    public static void main(String[] args) throws Exception{

        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();

        int ans = 0;

        while (sc.hasNextInt())
            if (isPrime(sc.nextInt()))
                ans++;

        System.out.println(ans);
    }
}

