import java.util.*;
import java.io.*;
import java.lang.*;

public class Main {
    static final int INF = 1000000000;     
    
    public static void main(String[] args) throws Exception {                
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int res = 0;
        for (int i = 0; i < n; ++i) {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        }
        System.out.println(res);
    }       
    
    static boolean isPrime(int x) {
        if (x < 2) return false;
        for (int i = 2; i <= Math.sqrt(x); ++i) {
            if (x % i == 0) return false;
        }
        return true;
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* java public class Main {
    static final int INF = 1000000000;     
    
    public static void main(String[] args) throws Exception {                
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int res = 0;
        for (int i = 0; i < n; ++i) {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        }
        System.out.println(res);
    }       
    
    static boolean isPrime(int x) {
        if (x < 2) return false;
        for (int i = 2; i <= Math.sqrt(x); ++i) {
            if (x % i == 0) return false;
        }
        return true;
    }
} Main static final int INF = 1000000000; INF 1000000000 public static void main(String[] args) throws Exception {                
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int res = 0;
        for (int i = 0; i < n; ++i) {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        }
        System.out.println(res);
    } main {                
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int res = 0;
        for (int i = 0; i < n; ++i) {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        }
        System.out.println(res);
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int n = input.nextInt(); n input.nextInt() input.nextInt input int res = 0; res 0 for (int i = 0; i < n; ++i) {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        } int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        } {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        } int x = input.nextInt(); x input.nextInt() input.nextInt input if (isPrime(x)) ++res; isPrime(x) isPrime x ++res res System.out.println(res) System.out.println System.out System System.out res String[] args args static boolean isPrime(int x) {
        if (x < 2) return false;
        for (int i = 2; i <= Math.sqrt(x); ++i) {
            if (x % i == 0) return false;
        }
        return true;
    } isPrime {
        if (x < 2) return false;
        for (int i = 2; i <= Math.sqrt(x); ++i) {
            if (x % i == 0) return false;
        }
        return true;
    } if (x < 2) return false; x < 2 x 2 return false; false for (int i = 2; i <= Math.sqrt(x); ++i) {
            if (x % i == 0) return false;
        } int i = 2; int i = 2; i 2 i <= Math.sqrt(x) i Math.sqrt(x) Math.sqrt Math x ++i ++i i {
            if (x % i == 0) return false;
        } {
            if (x % i == 0) return false;
        } if (x % i == 0) return false; x % i == 0 x % i x i 0 return false; false return true; true int x x public class Main {
    static final int INF = 1000000000;     
    
    public static void main(String[] args) throws Exception {                
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int res = 0;
        for (int i = 0; i < n; ++i) {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        }
        System.out.println(res);
    }       
    
    static boolean isPrime(int x) {
        if (x < 2) return false;
        for (int i = 2; i <= Math.sqrt(x); ++i) {
            if (x % i == 0) return false;
        }
        return true;
    }
} public class Main {
    static final int INF = 1000000000;     
    
    public static void main(String[] args) throws Exception {                
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int res = 0;
        for (int i = 0; i < n; ++i) {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        }
        System.out.println(res);
    }       
    
    static boolean isPrime(int x) {
        if (x < 2) return false;
        for (int i = 2; i <= Math.sqrt(x); ++i) {
            if (x % i == 0) return false;
        }
        return true;
    }
} Main
import java.util.*;
import java.io.*;
import java.lang.*;

public class Main {
    static final int INF = 1000000000;     
    
    public static void main(String[] args) throws Exception {                
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int res = 0;
        for (int i = 0; i < n; ++i) {
            int x = input.nextInt();
            if (isPrime(x)) ++res;
        }
        System.out.println(res);
    }       
    
    static boolean isPrime(int x) {
        if (x < 2) return false;
        for (int i = 2; i <= Math.sqrt(x); ++i) {
            if (x % i == 0) return false;
        }
        return true;
    }
}