import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner x = new Scanner(System.in);
        int s = x.nextInt();
        int prime = 0;
        for(int i=0;i<s;i++){
            if(Prime(x.nextInt())){
                prime++;
            }
        }
        System.out.println(prime);
    }
    public static boolean Prime(int p){
        boolean P =true;
        if(p<2){
            return false;
        }else{
            for(int i=2;i<=Math.sqrt(p);i++){
                if(p%i==0){
                    P = false;
                    break;
                }
            }
        }
        return P;
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner x = new Scanner(System.in);
        int s = x.nextInt();
        int prime = 0;
        for(int i=0;i<s;i++){
            if(Prime(x.nextInt())){
                prime++;
            }
        }
        System.out.println(prime);
    }
    public static boolean Prime(int p){
        boolean P =true;
        if(p<2){
            return false;
        }else{
            for(int i=2;i<=Math.sqrt(p);i++){
                if(p%i==0){
                    P = false;
                    break;
                }
            }
        }
        return P;
    }
} Main public static void main(String[] args){
        Scanner x = new Scanner(System.in);
        int s = x.nextInt();
        int prime = 0;
        for(int i=0;i<s;i++){
            if(Prime(x.nextInt())){
                prime++;
            }
        }
        System.out.println(prime);
    } main {
        Scanner x = new Scanner(System.in);
        int s = x.nextInt();
        int prime = 0;
        for(int i=0;i<s;i++){
            if(Prime(x.nextInt())){
                prime++;
            }
        }
        System.out.println(prime);
    } Scanner x = new Scanner(System.in); x new Scanner(System.in) int s = x.nextInt(); s x.nextInt() x.nextInt x int prime = 0; prime 0 for(int i=0;i<s;i++){
            if(Prime(x.nextInt())){
                prime++;
            }
        } int i=0; int i=0; i 0 i<s i s i++ i++ i {
            if(Prime(x.nextInt())){
                prime++;
            }
        } {
            if(Prime(x.nextInt())){
                prime++;
            }
        } if(Prime(x.nextInt())){
                prime++;
            } Prime(x.nextInt()) Prime x.nextInt() x.nextInt x {
                prime++;
            } prime++ prime System.out.println(prime) System.out.println System.out System System.out prime String[] args args public static boolean Prime(int p){
        boolean P =true;
        if(p<2){
            return false;
        }else{
            for(int i=2;i<=Math.sqrt(p);i++){
                if(p%i==0){
                    P = false;
                    break;
                }
            }
        }
        return P;
    } Prime {
        boolean P =true;
        if(p<2){
            return false;
        }else{
            for(int i=2;i<=Math.sqrt(p);i++){
                if(p%i==0){
                    P = false;
                    break;
                }
            }
        }
        return P;
    } boolean P =true; P true if(p<2){
            return false;
        }else{
            for(int i=2;i<=Math.sqrt(p);i++){
                if(p%i==0){
                    P = false;
                    break;
                }
            }
        } p<2 p 2 {
            return false;
        } return false; false {
            for(int i=2;i<=Math.sqrt(p);i++){
                if(p%i==0){
                    P = false;
                    break;
                }
            }
        } for(int i=2;i<=Math.sqrt(p);i++){
                if(p%i==0){
                    P = false;
                    break;
                }
            } int i=2; int i=2; i 2 i<=Math.sqrt(p) i Math.sqrt(p) Math.sqrt Math p i++ i++ i {
                if(p%i==0){
                    P = false;
                    break;
                }
            } {
                if(p%i==0){
                    P = false;
                    break;
                }
            } if(p%i==0){
                    P = false;
                    break;
                } p%i==0 p%i p i 0 {
                    P = false;
                    break;
                } P = false P false break; return P; P int p p
import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner x = new Scanner(System.in);
        int s = x.nextInt();
        int prime = 0;
        for(int i=0;i<s;i++){
            if(Prime(x.nextInt())){
                prime++;
            }
        }
        System.out.println(prime);
    }
    public static boolean Prime(int p){
        boolean P =true;
        if(p<2){
            return false;
        }else{
            for(int i=2;i<=Math.sqrt(p);i++){
                if(p%i==0){
                    P = false;
                    break;
                }
            }
        }
        return P;
    }
}
