import java.util.Scanner;

public class Main{
    static boolean is_prime(int p){
        for(int i = 2; i * i <= p; i++)
            if(p % i == 0) return false;
        return true;
    }

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int ps = scan.nextInt(); int r = 0;
        for(int i = 0; i < ps; i++)
            if(is_prime(scan.nextInt())) r++;
        System.out.println(r);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    static boolean is_prime(int p){
        for(int i = 2; i * i <= p; i++)
            if(p % i == 0) return false;
        return true;
    }

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int ps = scan.nextInt(); int r = 0;
        for(int i = 0; i < ps; i++)
            if(is_prime(scan.nextInt())) r++;
        System.out.println(r);
    }
} Main static boolean is_prime(int p){
        for(int i = 2; i * i <= p; i++)
            if(p % i == 0) return false;
        return true;
    } is_prime {
        for(int i = 2; i * i <= p; i++)
            if(p % i == 0) return false;
        return true;
    } for(int i = 2; i * i <= p; i++)
            if(p % i == 0) return false; int i = 2; int i = 2; i 2 i * i <= p i * i i i p i++ i++ i if(p % i == 0) return false; if(p % i == 0) return false; p % i == 0 p % i p i 0 return false; false return true; true int p p public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int ps = scan.nextInt(); int r = 0;
        for(int i = 0; i < ps; i++)
            if(is_prime(scan.nextInt())) r++;
        System.out.println(r);
    } main {
        Scanner scan = new Scanner(System.in);
        int ps = scan.nextInt(); int r = 0;
        for(int i = 0; i < ps; i++)
            if(is_prime(scan.nextInt())) r++;
        System.out.println(r);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int ps = scan.nextInt(); ps scan.nextInt() scan.nextInt scan int r = 0; r 0 for(int i = 0; i < ps; i++)
            if(is_prime(scan.nextInt())) r++; int i = 0; int i = 0; i 0 i < ps i ps i++ i++ i if(is_prime(scan.nextInt())) r++; if(is_prime(scan.nextInt())) r++; is_prime(scan.nextInt()) is_prime scan.nextInt() scan.nextInt scan r++ r System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main{
    static boolean is_prime(int p){
        for(int i = 2; i * i <= p; i++)
            if(p % i == 0) return false;
        return true;
    }

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int ps = scan.nextInt(); int r = 0;
        for(int i = 0; i < ps; i++)
            if(is_prime(scan.nextInt())) r++;
        System.out.println(r);
    }
} public class Main{
    static boolean is_prime(int p){
        for(int i = 2; i * i <= p; i++)
            if(p % i == 0) return false;
        return true;
    }

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int ps = scan.nextInt(); int r = 0;
        for(int i = 0; i < ps; i++)
            if(is_prime(scan.nextInt())) r++;
        System.out.println(r);
    }
} Main
import java.util.Scanner;

public class Main{
    static boolean is_prime(int p){
        for(int i = 2; i * i <= p; i++)
            if(p % i == 0) return false;
        return true;
    }

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int ps = scan.nextInt(); int r = 0;
        for(int i = 0; i < ps; i++)
            if(is_prime(scan.nextInt())) r++;
        System.out.println(r);
    }
}