import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int count = 0;
        for(int i = 0; i < x; i++){
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        }
        System.out.println(count);
    }
    public static boolean check(int y){
        int z = (int)Math.sqrt(y);
        for(int j = 2; j <= z; j++){
            if(y%j == 0){
                return false;
            }
        }
        return true;
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int count = 0;
        for(int i = 0; i < x; i++){
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        }
        System.out.println(count);
    }
    public static boolean check(int y){
        int z = (int)Math.sqrt(y);
        for(int j = 2; j <= z; j++){
            if(y%j == 0){
                return false;
            }
        }
        return true;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int count = 0;
        for(int i = 0; i < x; i++){
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int count = 0;
        for(int i = 0; i < x; i++){
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int i = 0; i < x; i++){
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        } int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        } {
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        } int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc if(y%2 == 0 && y != 2){
                continue;
            } y%2 == 0 && y != 2 y%2 == 0 y%2 y 2 0 y != 2 y 2 {
                continue;
            } continue; if(check(y)){
                count++;
            } check(y) check y {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public static boolean check(int y){
        int z = (int)Math.sqrt(y);
        for(int j = 2; j <= z; j++){
            if(y%j == 0){
                return false;
            }
        }
        return true;
    } check {
        int z = (int)Math.sqrt(y);
        for(int j = 2; j <= z; j++){
            if(y%j == 0){
                return false;
            }
        }
        return true;
    } int z = (int)Math.sqrt(y); z (int)Math.sqrt(y) Math.sqrt Math y for(int j = 2; j <= z; j++){
            if(y%j == 0){
                return false;
            }
        } int j = 2; int j = 2; j 2 j <= z j z j++ j++ j {
            if(y%j == 0){
                return false;
            }
        } {
            if(y%j == 0){
                return false;
            }
        } if(y%j == 0){
                return false;
            } y%j == 0 y%j y j 0 {
                return false;
            } return false; false return true; true int y y public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int count = 0;
        for(int i = 0; i < x; i++){
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        }
        System.out.println(count);
    }
    public static boolean check(int y){
        int z = (int)Math.sqrt(y);
        for(int j = 2; j <= z; j++){
            if(y%j == 0){
                return false;
            }
        }
        return true;
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int count = 0;
        for(int i = 0; i < x; i++){
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        }
        System.out.println(count);
    }
    public static boolean check(int y){
        int z = (int)Math.sqrt(y);
        for(int j = 2; j <= z; j++){
            if(y%j == 0){
                return false;
            }
        }
        return true;
    }
} Main
import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int count = 0;
        for(int i = 0; i < x; i++){
            int y = sc.nextInt();
            if(y%2 == 0 && y != 2){
                continue;
            }
            if(check(y)){
                count++;
            }
        }
        System.out.println(count);
    }
    public static boolean check(int y){
        int z = (int)Math.sqrt(y);
        for(int j = 2; j <= z; j++){
            if(y%j == 0){
                return false;
            }
        }
        return true;
    }
}