import java.math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int num = 0;
        for(int i = 0; i < N; ++i) {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        }
        System.out.println(num);
    }
} import java.math.*; math.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int num = 0;
        for(int i = 0; i < N; ++i) {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        }
        System.out.println(num);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int num = 0;
        for(int i = 0; i < N; ++i) {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        }
        System.out.println(num);
    } main {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int num = 0;
        for(int i = 0; i < N; ++i) {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        }
        System.out.println(num);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int num = 0; num 0 for(int i = 0; i < N; ++i) {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        } int i = 0; int i = 0; i 0 i < N i N ++i ++i i {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        } {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        } String s; s s = scan.next() s scan.next() scan.next scan if(new BigInteger(s).isProbablePrime(5)) ++num; new BigInteger(s).isProbablePrime(5) new BigInteger(s).isProbablePrime new BigInteger(s) 5 ++num num System.out.println(num) System.out.println System.out System System.out num String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int num = 0;
        for(int i = 0; i < N; ++i) {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        }
        System.out.println(num);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int num = 0;
        for(int i = 0; i < N; ++i) {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        }
        System.out.println(num);
    }
} Main
import java.math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int num = 0;
        for(int i = 0; i < N; ++i) {
            String s;
            s = scan.next();
            if(new BigInteger(s).isProbablePrime(5)) ++num;
        }
        System.out.println(num);
    }
}