import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main{

    public static void main(String[] args)throws IOException{
        BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int count = 0;
        int x;
        for(int i = 0; i < n; i++){
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        }
        System.out.println(count);
    }

    public static boolean isPrime(int x){
        if(x < 2) return false;
        else if(x == 2) return true;
        if(x % 2 == 0) return false;
        int i;
        for(i = 3; i * i <= x; i += 2){
            if(x % i == 0) return false;
        }
        return true;
    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main{

    public static void main(String[] args)throws IOException{
        BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int count = 0;
        int x;
        for(int i = 0; i < n; i++){
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        }
        System.out.println(count);
    }

    public static boolean isPrime(int x){
        if(x < 2) return false;
        else if(x == 2) return true;
        if(x % 2 == 0) return false;
        int i;
        for(i = 3; i * i <= x; i += 2){
            if(x % i == 0) return false;
        }
        return true;
    }

} Main public static void main(String[] args)throws IOException{
        BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int count = 0;
        int x;
        for(int i = 0; i < n; i++){
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        }
        System.out.println(count);
    } main {
        BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int count = 0;
        int x;
        for(int i = 0; i < n; i++){
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        }
        System.out.println(count);
    } BufferedReader  br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int count = 0; count 0 int x; x for(int i = 0; i < n; i++){
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        } {
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        } x = Integer.parseInt(br.readLine()) x Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(isPrime(x)) count++; isPrime(x) isPrime x count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public static boolean isPrime(int x){
        if(x < 2) return false;
        else if(x == 2) return true;
        if(x % 2 == 0) return false;
        int i;
        for(i = 3; i * i <= x; i += 2){
            if(x % i == 0) return false;
        }
        return true;
    } isPrime {
        if(x < 2) return false;
        else if(x == 2) return true;
        if(x % 2 == 0) return false;
        int i;
        for(i = 3; i * i <= x; i += 2){
            if(x % i == 0) return false;
        }
        return true;
    } if(x < 2) return false;
        else if(x == 2) return true; x < 2 x 2 return false; false if(x == 2) return true; x == 2 x 2 return true; true if(x % 2 == 0) return false; x % 2 == 0 x % 2 x 2 0 return false; false int i; i for(i = 3; i * i <= x; i += 2){
            if(x % i == 0) return false;
        } i = 3; i = 3 i 3 i * i <= x i * i i i x i += 2 i += 2 i 2 {
            if(x % i == 0) return false;
        } {
            if(x % i == 0) return false;
        } if(x % i == 0) return false; x % i == 0 x % i x i 0 return false; false return true; true int x x public class Main{

    public static void main(String[] args)throws IOException{
        BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int count = 0;
        int x;
        for(int i = 0; i < n; i++){
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        }
        System.out.println(count);
    }

    public static boolean isPrime(int x){
        if(x < 2) return false;
        else if(x == 2) return true;
        if(x % 2 == 0) return false;
        int i;
        for(i = 3; i * i <= x; i += 2){
            if(x % i == 0) return false;
        }
        return true;
    }

} public class Main{

    public static void main(String[] args)throws IOException{
        BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int count = 0;
        int x;
        for(int i = 0; i < n; i++){
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        }
        System.out.println(count);
    }

    public static boolean isPrime(int x){
        if(x < 2) return false;
        else if(x == 2) return true;
        if(x % 2 == 0) return false;
        int i;
        for(i = 3; i * i <= x; i += 2){
            if(x % i == 0) return false;
        }
        return true;
    }

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main{

    public static void main(String[] args)throws IOException{
        BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int count = 0;
        int x;
        for(int i = 0; i < n; i++){
            x = Integer.parseInt(br.readLine());
            if(isPrime(x)) count++;
        }
        System.out.println(count);
    }

    public static boolean isPrime(int x){
        if(x < 2) return false;
        else if(x == 2) return true;
        if(x % 2 == 0) return false;
        int i;
        for(i = 3; i * i <= x; i += 2){
            if(x % i == 0) return false;
        }
        return true;
    }

}