import java.util.*;
 
class Main {
        public static void main(String args[]) {
               // new Thread(null, () -> {
                        try(Scanner sc = new Scanner(System.in)){
                                boolean[] prime = new boolean[100000005];
                                prime[0] = true; prime[1] = true;
                                for (int i = 2; i <= Math.sqrt(100000005); i++) {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                }
                                int N = sc.nextInt();
                                int ans = 0;
                                for (int i = 0; i < N; i++) {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                }
                                System.out.println(ans);
                        }
                //}, "", 1<<24).start();
        }
} import java.util.*; util.* java class Main {
        public static void main(String args[]) {
               // new Thread(null, () -> {
                        try(Scanner sc = new Scanner(System.in)){
                                boolean[] prime = new boolean[100000005];
                                prime[0] = true; prime[1] = true;
                                for (int i = 2; i <= Math.sqrt(100000005); i++) {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                }
                                int N = sc.nextInt();
                                int ans = 0;
                                for (int i = 0; i < N; i++) {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                }
                                System.out.println(ans);
                        }
                //}, "", 1<<24).start();
        }
} Main public static void main(String args[]) {
               // new Thread(null, () -> {
                        try(Scanner sc = new Scanner(System.in)){
                                boolean[] prime = new boolean[100000005];
                                prime[0] = true; prime[1] = true;
                                for (int i = 2; i <= Math.sqrt(100000005); i++) {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                }
                                int N = sc.nextInt();
                                int ans = 0;
                                for (int i = 0; i < N; i++) {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                }
                                System.out.println(ans);
                        }
                //}, "", 1<<24).start();
        } main {
               // new Thread(null, () -> {
                        try(Scanner sc = new Scanner(System.in)){
                                boolean[] prime = new boolean[100000005];
                                prime[0] = true; prime[1] = true;
                                for (int i = 2; i <= Math.sqrt(100000005); i++) {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                }
                                int N = sc.nextInt();
                                int ans = 0;
                                for (int i = 0; i < N; i++) {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                }
                                System.out.println(ans);
                        }
                //}, "", 1<<24).start();
        } try(Scanner sc = new Scanner(System.in)){
                                boolean[] prime = new boolean[100000005];
                                prime[0] = true; prime[1] = true;
                                for (int i = 2; i <= Math.sqrt(100000005); i++) {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                }
                                int N = sc.nextInt();
                                int ans = 0;
                                for (int i = 0; i < N; i++) {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                }
                                System.out.println(ans);
                        } {
                                boolean[] prime = new boolean[100000005];
                                prime[0] = true; prime[1] = true;
                                for (int i = 2; i <= Math.sqrt(100000005); i++) {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                }
                                int N = sc.nextInt();
                                int ans = 0;
                                for (int i = 0; i < N; i++) {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                }
                                System.out.println(ans);
                        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) boolean[] prime = new boolean[100000005]; prime new boolean[100000005] 100000005 prime[0] = true prime[0] prime 0 true prime[1] = true prime[1] prime 1 true for (int i = 2; i <= Math.sqrt(100000005); i++) {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                } int i = 2; int i = 2; i 2 i <= Math.sqrt(100000005) i Math.sqrt(100000005) Math.sqrt Math 100000005 i++ i++ i {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                } {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                } if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        } !prime[i] prime[i] prime i {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        } int j = 2; j 2 while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                } i * j < 100000005 i * j i j 100000005 {
                                                        prime[i*j] = true;
                                                        j++;
                                                } prime[i*j] = true prime[i*j] prime i*j i j true j++ j int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 0; i < N; i++) {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                } {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                } if (!prime[sc.nextInt()]) {
                                                ans++;
                                        } !prime[sc.nextInt()] prime[sc.nextInt()] prime sc.nextInt() sc.nextInt sc {
                                                ans++;
                                        } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args
import java.util.*;
 
class Main {
        public static void main(String args[]) {
               // new Thread(null, () -> {
                        try(Scanner sc = new Scanner(System.in)){
                                boolean[] prime = new boolean[100000005];
                                prime[0] = true; prime[1] = true;
                                for (int i = 2; i <= Math.sqrt(100000005); i++) {
                                        if (!prime[i]) {
                                                int j = 2;
                                                while (i * j < 100000005) {
                                                        prime[i*j] = true;
                                                        j++;
                                                }
                                        }
                                }
                                int N = sc.nextInt();
                                int ans = 0;
                                for (int i = 0; i < N; i++) {
                                        if (!prime[sc.nextInt()]) {
                                                ans++;
                                        }
                                }
                                System.out.println(ans);
                        }
                //}, "", 1<<24).start();
        }
}