import java.util.*;
import java.util.stream.*;
class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n,ans;
        long num;
        n = input.nextInt();
        ans = 0;
        for (int i = 0; i < n; i++){
            num = input.nextLong();
            if (isPrime(num)){
                ans += 1;
            }
        }
        System.out.println(ans);
    }
    public static boolean isPrime(long n){
        for (int i = 2; i*i <= n; i++){
            if (n%i == 0){
                return false;
            }
        }
        return n != 1;
    }
} import java.util.*; util.* java import java.util.stream.*; stream.* java.util class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n,ans;
        long num;
        n = input.nextInt();
        ans = 0;
        for (int i = 0; i < n; i++){
            num = input.nextLong();
            if (isPrime(num)){
                ans += 1;
            }
        }
        System.out.println(ans);
    }
    public static boolean isPrime(long n){
        for (int i = 2; i*i <= n; i++){
            if (n%i == 0){
                return false;
            }
        }
        return n != 1;
    }
} Main public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n,ans;
        long num;
        n = input.nextInt();
        ans = 0;
        for (int i = 0; i < n; i++){
            num = input.nextLong();
            if (isPrime(num)){
                ans += 1;
            }
        }
        System.out.println(ans);
    } main {
        Scanner input = new Scanner(System.in);
        int n,ans;
        long num;
        n = input.nextInt();
        ans = 0;
        for (int i = 0; i < n; i++){
            num = input.nextLong();
            if (isPrime(num)){
                ans += 1;
            }
        }
        System.out.println(ans);
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int n n ans; ans long num; num n = input.nextInt() n input.nextInt() input.nextInt input ans = 0 ans 0 for (int i = 0; i < n; i++){
            num = input.nextLong();
            if (isPrime(num)){
                ans += 1;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            num = input.nextLong();
            if (isPrime(num)){
                ans += 1;
            }
        } {
            num = input.nextLong();
            if (isPrime(num)){
                ans += 1;
            }
        } num = input.nextLong() num input.nextLong() input.nextLong input if (isPrime(num)){
                ans += 1;
            } isPrime(num) isPrime num {
                ans += 1;
            } ans += 1 ans 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static boolean isPrime(long n){
        for (int i = 2; i*i <= n; i++){
            if (n%i == 0){
                return false;
            }
        }
        return n != 1;
    } isPrime {
        for (int i = 2; i*i <= n; i++){
            if (n%i == 0){
                return false;
            }
        }
        return n != 1;
    } for (int i = 2; i*i <= n; i++){
            if (n%i == 0){
                return false;
            }
        } int i = 2; int i = 2; i 2 i*i <= n i*i i i n i++ i++ i {
            if (n%i == 0){
                return false;
            }
        } {
            if (n%i == 0){
                return false;
            }
        } if (n%i == 0){
                return false;
            } n%i == 0 n%i n i 0 {
                return false;
            } return false; false return n != 1; n != 1 n 1 long n n
import java.util.*;
import java.util.stream.*;
class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n,ans;
        long num;
        n = input.nextInt();
        ans = 0;
        for (int i = 0; i < n; i++){
            num = input.nextLong();
            if (isPrime(num)){
                ans += 1;
            }
        }
        System.out.println(ans);
    }
    public static boolean isPrime(long n){
        for (int i = 2; i*i <= n; i++){
            if (n%i == 0){
                return false;
            }
        }
        return n != 1;
    }
}
