import java.util.ArrayList;
import java.util.Scanner;
 
public class Main {
 
    public static final int BIG_NUM  = 2000000000;
    public static final int MOD  = 1000000007;
 
    public static void main(String[] args) {
 
        int table[] = new int[10001];
 
        for(int i = 0; i <= 10000; i++){
            table[i] = 1;
        }
 
        int limit = (int)Math.sqrt(10000);
        for(int i = 2; i <= limit; i++){
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        }
 
        ArrayList<Integer> prime = new ArrayList<Integer>();
        for(int i = 2; i <= 10000; i++){
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        }
 
        Scanner scanner = new Scanner(System.in);
 
        int N = scanner.nextInt();
        int input,tmp,count = 0;
        boolean FLG;
 
        for(int loop = 0; loop < N; loop++){
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        }
        System.out.println(count);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
 
    public static final int BIG_NUM  = 2000000000;
    public static final int MOD  = 1000000007;
 
    public static void main(String[] args) {
 
        int table[] = new int[10001];
 
        for(int i = 0; i <= 10000; i++){
            table[i] = 1;
        }
 
        int limit = (int)Math.sqrt(10000);
        for(int i = 2; i <= limit; i++){
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        }
 
        ArrayList<Integer> prime = new ArrayList<Integer>();
        for(int i = 2; i <= 10000; i++){
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        }
 
        Scanner scanner = new Scanner(System.in);
 
        int N = scanner.nextInt();
        int input,tmp,count = 0;
        boolean FLG;
 
        for(int loop = 0; loop < N; loop++){
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        }
        System.out.println(count);
    }
} Main public static final int BIG_NUM  = 2000000000; BIG_NUM 2000000000 public static final int MOD  = 1000000007; MOD 1000000007 public static void main(String[] args) {
 
        int table[] = new int[10001];
 
        for(int i = 0; i <= 10000; i++){
            table[i] = 1;
        }
 
        int limit = (int)Math.sqrt(10000);
        for(int i = 2; i <= limit; i++){
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        }
 
        ArrayList<Integer> prime = new ArrayList<Integer>();
        for(int i = 2; i <= 10000; i++){
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        }
 
        Scanner scanner = new Scanner(System.in);
 
        int N = scanner.nextInt();
        int input,tmp,count = 0;
        boolean FLG;
 
        for(int loop = 0; loop < N; loop++){
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        }
        System.out.println(count);
    } main {
 
        int table[] = new int[10001];
 
        for(int i = 0; i <= 10000; i++){
            table[i] = 1;
        }
 
        int limit = (int)Math.sqrt(10000);
        for(int i = 2; i <= limit; i++){
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        }
 
        ArrayList<Integer> prime = new ArrayList<Integer>();
        for(int i = 2; i <= 10000; i++){
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        }
 
        Scanner scanner = new Scanner(System.in);
 
        int N = scanner.nextInt();
        int input,tmp,count = 0;
        boolean FLG;
 
        for(int loop = 0; loop < N; loop++){
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        }
        System.out.println(count);
    } int table[] = new int[10001]; table new int[10001] 10001 for(int i = 0; i <= 10000; i++){
            table[i] = 1;
        } int i = 0; int i = 0; i 0 i <= 10000 i 10000 i++ i++ i {
            table[i] = 1;
        } {
            table[i] = 1;
        } table[i] = 1 table[i] table i 1 int limit = (int)Math.sqrt(10000); limit (int)Math.sqrt(10000) Math.sqrt Math 10000 for(int i = 2; i <= limit; i++){
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        } int i = 2; int i = 2; i 2 i <= limit i limit i++ i++ i {
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        } {
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        } if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            } table[i] == 1 table[i] table i 1 {
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            } for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                } int k = 2*i; int k = 2*i; k 2*i 2 i k <= 10000 k 10000 k += i k += i k i {
                    table[k] = 0;
                } {
                    table[k] = 0;
                } table[k] = 0 table[k] table k 0 ArrayList<Integer> prime = new ArrayList<Integer>(); prime new ArrayList<Integer>() for(int i = 2; i <= 10000; i++){
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        } int i = 2; int i = 2; i 2 i <= 10000 i 10000 i++ i++ i {
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        } {
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        } if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            } table[i] == 1 table[i] table i 1 {
                prime.add(Integer.valueOf(i));
            } prime.add(Integer.valueOf(i)) prime.add prime Integer.valueOf(i) Integer.valueOf Integer i Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int input input tmp tmp count = 0; count 0 boolean FLG; FLG for(int loop = 0; loop < N; loop++){
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        } int loop = 0; int loop = 0; loop 0 loop < N loop N loop++ loop++ loop {
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        } {
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        } input = scanner.nextInt() input scanner.nextInt() scanner.nextInt scanner FLG = false FLG false for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            } int i = 0; int i = 0; i 0 i < prime.size() i prime.size() prime.size prime i++ i++ i {
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            } {
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            } tmp = prime.get(i) tmp prime.get(i) prime.get prime i if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                } input%tmp == 0 && (input/tmp) > 1 input%tmp == 0 input%tmp input tmp 0 (input/tmp) > 1 (input/tmp) input tmp 1 {
                    FLG = true;
                    break;
                } FLG = true FLG true break; if(tmp*tmp > input){
                    break;
                } tmp*tmp > input tmp*tmp tmp tmp input {
                    break;
                } break; if(!FLG)count++; !FLG FLG count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
 
    public static final int BIG_NUM  = 2000000000;
    public static final int MOD  = 1000000007;
 
    public static void main(String[] args) {
 
        int table[] = new int[10001];
 
        for(int i = 0; i <= 10000; i++){
            table[i] = 1;
        }
 
        int limit = (int)Math.sqrt(10000);
        for(int i = 2; i <= limit; i++){
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        }
 
        ArrayList<Integer> prime = new ArrayList<Integer>();
        for(int i = 2; i <= 10000; i++){
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        }
 
        Scanner scanner = new Scanner(System.in);
 
        int N = scanner.nextInt();
        int input,tmp,count = 0;
        boolean FLG;
 
        for(int loop = 0; loop < N; loop++){
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        }
        System.out.println(count);
    }
} public class Main {
 
    public static final int BIG_NUM  = 2000000000;
    public static final int MOD  = 1000000007;
 
    public static void main(String[] args) {
 
        int table[] = new int[10001];
 
        for(int i = 0; i <= 10000; i++){
            table[i] = 1;
        }
 
        int limit = (int)Math.sqrt(10000);
        for(int i = 2; i <= limit; i++){
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        }
 
        ArrayList<Integer> prime = new ArrayList<Integer>();
        for(int i = 2; i <= 10000; i++){
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        }
 
        Scanner scanner = new Scanner(System.in);
 
        int N = scanner.nextInt();
        int input,tmp,count = 0;
        boolean FLG;
 
        for(int loop = 0; loop < N; loop++){
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        }
        System.out.println(count);
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;
 
public class Main {
 
    public static final int BIG_NUM  = 2000000000;
    public static final int MOD  = 1000000007;
 
    public static void main(String[] args) {
 
        int table[] = new int[10001];
 
        for(int i = 0; i <= 10000; i++){
            table[i] = 1;
        }
 
        int limit = (int)Math.sqrt(10000);
        for(int i = 2; i <= limit; i++){
            if(table[i] == 1){
                for(int k = 2*i; k <= 10000; k += i){
                    table[k] = 0;
                }
            }
        }
 
        ArrayList<Integer> prime = new ArrayList<Integer>();
        for(int i = 2; i <= 10000; i++){
            if(table[i] == 1){
                prime.add(Integer.valueOf(i));
            }
        }
 
        Scanner scanner = new Scanner(System.in);
 
        int N = scanner.nextInt();
        int input,tmp,count = 0;
        boolean FLG;
 
        for(int loop = 0; loop < N; loop++){
            input = scanner.nextInt();
 
            FLG = false;
            for(int i = 0; i < prime.size(); i++){
                tmp = prime.get(i);
                if(input%tmp == 0 && (input/tmp) > 1){
                    FLG = true;
                    break;
                }
                if(tmp*tmp > input){
                    break;
                }
            }
            if(!FLG)count++;
        }
        System.out.println(count);
    }
}
