import java.util.Scanner;

public class Main {
    public static int MAX = 100000;
    public static boolean isPrime(int num){
        if(num < 2)
            return false;
        if(num == 2)
            return true;
        if(num % 2 ==0)
            return false;
        for(int i = 3;i * i <= num;i += 2){
            if(num % i == 0)
                return false;
        }
        return true;
    }
    public static void main(String[] args) {
        int n;
        int count = 0;
        int[] A = new int[MAX];
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        for(int i = 0;i < n;i ++)
            A[i] = sc.nextInt();
        for(int j = 0;j < n;j ++){
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        }
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static int MAX = 100000;
    public static boolean isPrime(int num){
        if(num < 2)
            return false;
        if(num == 2)
            return true;
        if(num % 2 ==0)
            return false;
        for(int i = 3;i * i <= num;i += 2){
            if(num % i == 0)
                return false;
        }
        return true;
    }
    public static void main(String[] args) {
        int n;
        int count = 0;
        int[] A = new int[MAX];
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        for(int i = 0;i < n;i ++)
            A[i] = sc.nextInt();
        for(int j = 0;j < n;j ++){
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        }
        System.out.println(count);
    }
} Main public static int MAX = 100000; MAX 100000 public static boolean isPrime(int num){
        if(num < 2)
            return false;
        if(num == 2)
            return true;
        if(num % 2 ==0)
            return false;
        for(int i = 3;i * i <= num;i += 2){
            if(num % i == 0)
                return false;
        }
        return true;
    } isPrime {
        if(num < 2)
            return false;
        if(num == 2)
            return true;
        if(num % 2 ==0)
            return false;
        for(int i = 3;i * i <= num;i += 2){
            if(num % i == 0)
                return false;
        }
        return true;
    } if(num < 2)
            return false; num < 2 num 2 return false; false if(num == 2)
            return true; num == 2 num 2 return true; true if(num % 2 ==0)
            return false; num % 2 ==0 num % 2 num 2 0 return false; false for(int i = 3;i * i <= num;i += 2){
            if(num % i == 0)
                return false;
        } int i = 3; int i = 3; i 3 i * i <= num i * i i i num i += 2 i += 2 i 2 {
            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 static void main(String[] args) {
        int n;
        int count = 0;
        int[] A = new int[MAX];
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        for(int i = 0;i < n;i ++)
            A[i] = sc.nextInt();
        for(int j = 0;j < n;j ++){
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        }
        System.out.println(count);
    } main {
        int n;
        int count = 0;
        int[] A = new int[MAX];
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        for(int i = 0;i < n;i ++)
            A[i] = sc.nextInt();
        for(int j = 0;j < n;j ++){
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        }
        System.out.println(count);
    } int n; n int count = 0; count 0 int[] A = new int[MAX]; A new int[MAX] MAX Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc for(int i = 0;i < n;i ++)
            A[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i ++ i ++ i A[i] = sc.nextInt(); A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc for(int j = 0;j < n;j ++){
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        } int j = 0; int j = 0; j 0 j < n j n j ++ j ++ j {
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        } {
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        } boolean flag = isPrime(A[j]); flag isPrime(A[j]) isPrime A[j] A j if(flag)
                count ++; flag count ++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static int MAX = 100000;
    public static boolean isPrime(int num){
        if(num < 2)
            return false;
        if(num == 2)
            return true;
        if(num % 2 ==0)
            return false;
        for(int i = 3;i * i <= num;i += 2){
            if(num % i == 0)
                return false;
        }
        return true;
    }
    public static void main(String[] args) {
        int n;
        int count = 0;
        int[] A = new int[MAX];
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        for(int i = 0;i < n;i ++)
            A[i] = sc.nextInt();
        for(int j = 0;j < n;j ++){
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        }
        System.out.println(count);
    }
} public class Main {
    public static int MAX = 100000;
    public static boolean isPrime(int num){
        if(num < 2)
            return false;
        if(num == 2)
            return true;
        if(num % 2 ==0)
            return false;
        for(int i = 3;i * i <= num;i += 2){
            if(num % i == 0)
                return false;
        }
        return true;
    }
    public static void main(String[] args) {
        int n;
        int count = 0;
        int[] A = new int[MAX];
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        for(int i = 0;i < n;i ++)
            A[i] = sc.nextInt();
        for(int j = 0;j < n;j ++){
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        }
        System.out.println(count);
    }
} Main
import java.util.Scanner;

public class Main {
    public static int MAX = 100000;
    public static boolean isPrime(int num){
        if(num < 2)
            return false;
        if(num == 2)
            return true;
        if(num % 2 ==0)
            return false;
        for(int i = 3;i * i <= num;i += 2){
            if(num % i == 0)
                return false;
        }
        return true;
    }
    public static void main(String[] args) {
        int n;
        int count = 0;
        int[] A = new int[MAX];
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        for(int i = 0;i < n;i ++)
            A[i] = sc.nextInt();
        for(int j = 0;j < n;j ++){
            boolean flag = isPrime(A[j]);
            if(flag)
                count ++;
        }
        System.out.println(count);
    }
}
