import java.util.Scanner;

public class Main {
    private static Scanner sc=new Scanner(System.in);
    public static void main(String[] args){
        int n=sc.nextInt();
        int[] a=new int[n];
        int notprime=0;
        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        }
        System.out.println(n-notprime);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    private static Scanner sc=new Scanner(System.in);
    public static void main(String[] args){
        int n=sc.nextInt();
        int[] a=new int[n];
        int notprime=0;
        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        }
        System.out.println(n-notprime);
    }
} Main private static Scanner sc=new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){
        int n=sc.nextInt();
        int[] a=new int[n];
        int notprime=0;
        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        }
        System.out.println(n-notprime);
    } main {
        int n=sc.nextInt();
        int[] a=new int[n];
        int notprime=0;
        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        }
        System.out.println(n-notprime);
    } int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a=new int[n]; a new int[n] n int notprime=0; notprime 0 for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        } {
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        } a[i]=sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            } int j=2; int j=2; j 2 j<=Math.sqrt(a[i]) j Math.sqrt(a[i]) Math.sqrt Math a[i] a i j++ j++ j {
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            } {
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            } if(a[i]%j==0){
                    notprime++;
                    break;
                } a[i]%j==0 a[i]%j a[i] a i j 0 {
                    notprime++;
                    break;
                } notprime++ notprime break; System.out.println(n-notprime) System.out.println System.out System System.out n-notprime n notprime String[] args args public class Main {
    private static Scanner sc=new Scanner(System.in);
    public static void main(String[] args){
        int n=sc.nextInt();
        int[] a=new int[n];
        int notprime=0;
        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        }
        System.out.println(n-notprime);
    }
} public class Main {
    private static Scanner sc=new Scanner(System.in);
    public static void main(String[] args){
        int n=sc.nextInt();
        int[] a=new int[n];
        int notprime=0;
        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        }
        System.out.println(n-notprime);
    }
} Main
import java.util.Scanner;

public class Main {
    private static Scanner sc=new Scanner(System.in);
    public static void main(String[] args){
        int n=sc.nextInt();
        int[] a=new int[n];
        int notprime=0;
        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            for(int j=2;j<=Math.sqrt(a[i]);j++){
                if(a[i]%j==0){
                    notprime++;
                    break;
                }
            }
        }
        System.out.println(n-notprime);
    }
}