

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] arr = new int[N];
        for(int i = 0; i < N; i++)
        {
            arr[i] = sc.nextInt();
        }
        int count = 0;
        for(int p: arr)
        {
            if(isPrime(p)) count++;
        }
        System.out.println(count);
    }
    public static boolean isPrime(int N) {
        if(N == 1) return false;
        for(long i = 2; i * i <= N; i++) {
            if(N % i == 0) return false;
        }
        return true;
    }
}
 import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] arr = new int[N];
        for(int i = 0; i < N; i++)
        {
            arr[i] = sc.nextInt();
        }
        int count = 0;
        for(int p: arr)
        {
            if(isPrime(p)) count++;
        }
        System.out.println(count);
    }
    public static boolean isPrime(int N) {
        if(N == 1) return false;
        for(long i = 2; i * i <= N; i++) {
            if(N % i == 0) return false;
        }
        return true;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] arr = new int[N];
        for(int i = 0; i < N; i++)
        {
            arr[i] = sc.nextInt();
        }
        int count = 0;
        for(int p: arr)
        {
            if(isPrime(p)) count++;
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] arr = new int[N];
        for(int i = 0; i < N; i++)
        {
            arr[i] = sc.nextInt();
        }
        int count = 0;
        for(int p: arr)
        {
            if(isPrime(p)) count++;
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] arr = new int[N]; arr new int[N] N for(int i = 0; i < N; i++)
        {
            arr[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            arr[i] = sc.nextInt();
        } {
            arr[i] = sc.nextInt();
        } arr[i] = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int p: arr)
        {
            if(isPrime(p)) count++;
        } int p arr {
            if(isPrime(p)) count++;
        } {
            if(isPrime(p)) count++;
        } if(isPrime(p)) count++; isPrime(p) isPrime p count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public static boolean isPrime(int N) {
        if(N == 1) return false;
        for(long i = 2; i * i <= N; i++) {
            if(N % i == 0) return false;
        }
        return true;
    } isPrime {
        if(N == 1) return false;
        for(long i = 2; i * i <= N; i++) {
            if(N % i == 0) return false;
        }
        return true;
    } if(N == 1) return false; N == 1 N 1 return false; false for(long i = 2; i * i <= N; i++) {
            if(N % i == 0) return false;
        } long i = 2; long i = 2; i 2 i * i <= N i * i i i N i++ i++ i {
            if(N % i == 0) return false;
        } {
            if(N % i == 0) return false;
        } if(N % i == 0) return false; N % i == 0 N % i N i 0 return false; false return true; true int N N public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] arr = new int[N];
        for(int i = 0; i < N; i++)
        {
            arr[i] = sc.nextInt();
        }
        int count = 0;
        for(int p: arr)
        {
            if(isPrime(p)) count++;
        }
        System.out.println(count);
    }
    public static boolean isPrime(int N) {
        if(N == 1) return false;
        for(long i = 2; i * i <= N; i++) {
            if(N % i == 0) return false;
        }
        return true;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] arr = new int[N];
        for(int i = 0; i < N; i++)
        {
            arr[i] = sc.nextInt();
        }
        int count = 0;
        for(int p: arr)
        {
            if(isPrime(p)) count++;
        }
        System.out.println(count);
    }
    public static boolean isPrime(int N) {
        if(N == 1) return false;
        for(long i = 2; i * i <= N; i++) {
            if(N % i == 0) return false;
        }
        return true;
    }
} Main


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] arr = new int[N];
        for(int i = 0; i < N; i++)
        {
            arr[i] = sc.nextInt();
        }
        int count = 0;
        for(int p: arr)
        {
            if(isPrime(p)) count++;
        }
        System.out.println(count);
    }
    public static boolean isPrime(int N) {
        if(N == 1) return false;
        for(long i = 2; i * i <= N; i++) {
            if(N % i == 0) return false;
        }
        return true;
    }
}

