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

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int count = 0;

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

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

        for(int i = 0; i < num; i++){
            String x = sc.next();
            if(new BigInteger(x).isProbablePrime(5)){
                count++;
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int count = 0;

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

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

        for(int i = 0; i < num; i++){
            String x = sc.next();
            if(new BigInteger(x).isProbablePrime(5)){
                count++;
            }
        }
        System.out.println(count);
    }
} Main
import java.math.*;
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int count = 0;

        for(int i = 0; i < num; i++){
            String x = sc.next();
            if(new BigInteger(x).isProbablePrime(5)){
                count++;
            }
        }
        System.out.println(count);
    }
}
