import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        int[] era = new int[100000001];
        for(int i = 2; i <= 100000000; i++){
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        }
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
    	int cnt = 0;
        for(int i = 0; i < n; i++){
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        }
    	System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        int[] era = new int[100000001];
        for(int i = 2; i <= 100000000; i++){
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        }
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
    	int cnt = 0;
        for(int i = 0; i < n; i++){
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        }
    	System.out.println(cnt);
    }
} Main public static void main(String[] args){
        int[] era = new int[100000001];
        for(int i = 2; i <= 100000000; i++){
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        }
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
    	int cnt = 0;
        for(int i = 0; i < n; i++){
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        }
    	System.out.println(cnt);
    } main {
        int[] era = new int[100000001];
        for(int i = 2; i <= 100000000; i++){
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        }
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
    	int cnt = 0;
        for(int i = 0; i < n; i++){
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        }
    	System.out.println(cnt);
    } int[] era = new int[100000001]; era new int[100000001] 100000001 for(int i = 2; i <= 100000000; i++){
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        } int i = 2; int i = 2; i 2 i <= 100000000 i 100000000 i++ i++ i {
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        } {
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        } if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            } era[i] == 0 era[i] era i 0 {
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            } era[i] = 1 era[i] era i 1 if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                } i <= 10000 i 10000 {
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                } int j = 2*i; j 2*i 2 i while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    } j <= 100000000 j 100000000 {
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    } if(era[j] == 0){
                            era[j] = -1;
                        } era[j] == 0 era[j] era j 0 {
                            era[j] = -1;
                        } era[j] = -1 era[j] era j -1 1 j += i j i Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int cnt = 0; cnt 0 for(int i = 0; i < n; i++){
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        } {
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        } int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan if(era[x] > 0){
                cnt++;
            } era[x] > 0 era[x] era x 0 {
                cnt++;
            } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main{
    public static void main(String[] args){
        int[] era = new int[100000001];
        for(int i = 2; i <= 100000000; i++){
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        }
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
    	int cnt = 0;
        for(int i = 0; i < n; i++){
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        }
    	System.out.println(cnt);
    }
} public class Main{
    public static void main(String[] args){
        int[] era = new int[100000001];
        for(int i = 2; i <= 100000000; i++){
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        }
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
    	int cnt = 0;
        for(int i = 0; i < n; i++){
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        }
    	System.out.println(cnt);
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        int[] era = new int[100000001];
        for(int i = 2; i <= 100000000; i++){
            if(era[i] == 0){
                era[i] = 1;
                if(i <= 10000){
                    int j = 2*i;
                    while(j <= 100000000){
                        if(era[j] == 0){
                            era[j] = -1;
                        }
                        j += i;
                    }
                }
            }
        }
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
    	int cnt = 0;
        for(int i = 0; i < n; i++){
            int x = scan.nextInt();
            if(era[x] > 0){
                cnt++;
            }
        }
    	System.out.println(cnt);
    }
}
