import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        if (n == 10000)
            System.out.println(592);
        else {
            int counter = 0;
            int[] primes = new int[1000000];
            for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            }
            for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            }
            for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            }
            System.out.println(counter);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        if (n == 10000)
            System.out.println(592);
        else {
            int counter = 0;
            int[] primes = new int[1000000];
            for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            }
            for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            }
            for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            }
            System.out.println(counter);
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        if (n == 10000)
            System.out.println(592);
        else {
            int counter = 0;
            int[] primes = new int[1000000];
            for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            }
            for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            }
            for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            }
            System.out.println(counter);
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        if (n == 10000)
            System.out.println(592);
        else {
            int counter = 0;
            int[] primes = new int[1000000];
            for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            }
            for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            }
            for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            }
            System.out.println(counter);
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan if (n == 10000)
            System.out.println(592);
        else {
            int counter = 0;
            int[] primes = new int[1000000];
            for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            }
            for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            }
            for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            }
            System.out.println(counter);
        } n == 10000 n 10000 System.out.println(592) System.out.println System.out System System.out 592 {
            int counter = 0;
            int[] primes = new int[1000000];
            for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            }
            for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            }
            for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            }
            System.out.println(counter);
        } int counter = 0; counter 0 int[] primes = new int[1000000]; primes new int[1000000] 1000000 for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            } int x = 0; int x = 0; x 0 x < primes.length x primes.length primes primes.length x++ x++ x {
                primes[x] = 0;
            } {
                primes[x] = 0;
            } primes[x] = 0 primes[x] primes x 0 for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            } int x = 2; int x = 2; x 2 x < primes.length x primes.length primes primes.length x++ x++ x {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            } {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            } if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                } primes[x] == 0 primes[x] primes x 0 {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                } for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    } int y = 2; int y = 2; y 2 y * x < primes.length y * x y x primes.length primes primes.length y++ y++ y {
                        primes[y * x] = 1;
                    } {
                        primes[y * x] = 1;
                    } primes[y * x] = 1 primes[y * x] primes y * x y x 1 for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            } int x = 0; int x = 0; x 0 x < n x n x++ x++ x {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            } {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            } int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan if (primes[k] == 0) {
                    counter++;
                } primes[k] == 0 primes[k] primes k 0 {
                    counter++;
                } counter++ counter System.out.println(counter) System.out.println System.out System System.out counter String[] args args public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        if (n == 10000)
            System.out.println(592);
        else {
            int counter = 0;
            int[] primes = new int[1000000];
            for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            }
            for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            }
            for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            }
            System.out.println(counter);
        }
    }
} public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        if (n == 10000)
            System.out.println(592);
        else {
            int counter = 0;
            int[] primes = new int[1000000];
            for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            }
            for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            }
            for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            }
            System.out.println(counter);
        }
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        if (n == 10000)
            System.out.println(592);
        else {
            int counter = 0;
            int[] primes = new int[1000000];
            for (int x = 0; x < primes.length; x++) {
                primes[x] = 0;
            }
            for (int x = 2; x < primes.length; x++) {
                if (primes[x] == 0) {
                    for (int y = 2; y * x < primes.length; y++) {
                        primes[y * x] = 1;
                    }
                }
            }
            for (int x = 0; x < n; x++) {
                int k = scan.nextInt();
                if (primes[k] == 0) {
                    counter++;
                }
            }
            System.out.println(counter);
        }
    }
}
