import java.util.Scanner;

class Main { 
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int count = 0;
        
        boolean primes[] = new boolean [100000000];
        for(int n = 2; n < primes.length; n++){
            if(primes[n]) continue;
            for(int m = 2 * n; m < primes.length; m += n){
                primes[m] = true;
            }
        }
               
        while (N != 0) {
            int num = in.nextInt();
            if (!primes[num]) count++;
            N--;
        }
        
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util class Main { 
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int count = 0;
        
        boolean primes[] = new boolean [100000000];
        for(int n = 2; n < primes.length; n++){
            if(primes[n]) continue;
            for(int m = 2 * n; m < primes.length; m += n){
                primes[m] = true;
            }
        }
               
        while (N != 0) {
            int num = in.nextInt();
            if (!primes[num]) count++;
            N--;
        }
        
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int count = 0;
        
        boolean primes[] = new boolean [100000000];
        for(int n = 2; n < primes.length; n++){
            if(primes[n]) continue;
            for(int m = 2 * n; m < primes.length; m += n){
                primes[m] = true;
            }
        }
               
        while (N != 0) {
            int num = in.nextInt();
            if (!primes[num]) count++;
            N--;
        }
        
        System.out.println(count);
    } main {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int count = 0;
        
        boolean primes[] = new boolean [100000000];
        for(int n = 2; n < primes.length; n++){
            if(primes[n]) continue;
            for(int m = 2 * n; m < primes.length; m += n){
                primes[m] = true;
            }
        }
               
        while (N != 0) {
            int num = in.nextInt();
            if (!primes[num]) count++;
            N--;
        }
        
        System.out.println(count);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int count = 0; count 0 boolean primes[] = new boolean [100000000]; primes new boolean [100000000] 100000000 for(int n = 2; n < primes.length; n++){
            if(primes[n]) continue;
            for(int m = 2 * n; m < primes.length; m += n){
                primes[m] = true;
            }
        } int n = 2; int n = 2; n 2 n < primes.length n primes.length primes primes.length n++ n++ n {
            if(primes[n]) continue;
            for(int m = 2 * n; m < primes.length; m += n){
                primes[m] = true;
            }
        } {
            if(primes[n]) continue;
            for(int m = 2 * n; m < primes.length; m += n){
                primes[m] = true;
            }
        } if(primes[n]) continue; primes[n] primes n continue; for(int m = 2 * n; m < primes.length; m += n){
                primes[m] = true;
            } int m = 2 * n; int m = 2 * n; m 2 * n 2 n m < primes.length m primes.length primes primes.length m += n m += n m n {
                primes[m] = true;
            } {
                primes[m] = true;
            } primes[m] = true primes[m] primes m true while (N != 0) {
            int num = in.nextInt();
            if (!primes[num]) count++;
            N--;
        } N != 0 N 0 {
            int num = in.nextInt();
            if (!primes[num]) count++;
            N--;
        } int num = in.nextInt(); num in.nextInt() in.nextInt in if (!primes[num]) count++; !primes[num] primes[num] primes num count++ count N-- N System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.Scanner;

class Main { 
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int count = 0;
        
        boolean primes[] = new boolean [100000000];
        for(int n = 2; n < primes.length; n++){
            if(primes[n]) continue;
            for(int m = 2 * n; m < primes.length; m += n){
                primes[m] = true;
            }
        }
               
        while (N != 0) {
            int num = in.nextInt();
            if (!primes[num]) count++;
            N--;
        }
        
        System.out.println(count);
    }
}