import java.io.*;
import java.util.*;
 
public class Main {
 
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
    private static StringTokenizer st;
 
    public static void main ( String [] args ) throws IOException
    {
    new Main().cal();
    }
 
  
    private void cal() throws IOException 
    {
    int N = Integer.parseInt(br.readLine());
    int [] nums = new int[N];
     
    for(int i = 0; i < N; i++)
        nums[i] = Integer.parseInt(br.readLine());
 
    int count = 0;
    for(int n : nums)
        if ( isPrime(n) ) count++;
 
    System.out.println(count);
 
    }
 
    private boolean isPrime(int n) {
    if ( n == 2 ) return true;
    else if ( n % 2 == 0 ) return false;
    else if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    }
 
 
    }
 
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
 
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
    private static StringTokenizer st;
 
    public static void main ( String [] args ) throws IOException
    {
    new Main().cal();
    }
 
  
    private void cal() throws IOException 
    {
    int N = Integer.parseInt(br.readLine());
    int [] nums = new int[N];
     
    for(int i = 0; i < N; i++)
        nums[i] = Integer.parseInt(br.readLine());
 
    int count = 0;
    for(int n : nums)
        if ( isPrime(n) ) count++;
 
    System.out.println(count);
 
    }
 
    private boolean isPrime(int n) {
    if ( n == 2 ) return true;
    else if ( n % 2 == 0 ) return false;
    else if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    }
 
 
    }
 
} Main private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) private static StringTokenizer st; st public static void main ( String [] args ) throws IOException
    {
    new Main().cal();
    } main {
    new Main().cal();
    } new Main().cal() new Main().cal new Main() String [] args args private void cal() throws IOException 
    {
    int N = Integer.parseInt(br.readLine());
    int [] nums = new int[N];
     
    for(int i = 0; i < N; i++)
        nums[i] = Integer.parseInt(br.readLine());
 
    int count = 0;
    for(int n : nums)
        if ( isPrime(n) ) count++;
 
    System.out.println(count);
 
    } cal {
    int N = Integer.parseInt(br.readLine());
    int [] nums = new int[N];
     
    for(int i = 0; i < N; i++)
        nums[i] = Integer.parseInt(br.readLine());
 
    int count = 0;
    for(int n : nums)
        if ( isPrime(n) ) count++;
 
    System.out.println(count);
 
    } int N = Integer.parseInt(br.readLine()); N Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int [] nums = new int[N]; nums new int[N] N for(int i = 0; i < N; i++)
        nums[i] = Integer.parseInt(br.readLine()); int i = 0; int i = 0; i 0 i < N i N i++ i++ i nums[i] = Integer.parseInt(br.readLine()); nums[i] = Integer.parseInt(br.readLine()) nums[i] nums i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int count = 0; count 0 for(int n : nums)
        if ( isPrime(n) ) count++; int n nums if ( isPrime(n) ) count++; if ( isPrime(n) ) count++; isPrime(n) isPrime n count++ count System.out.println(count) System.out.println System.out System System.out count private boolean isPrime(int n) {
    if ( n == 2 ) return true;
    else if ( n % 2 == 0 ) return false;
    else if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    }
 
 
    } isPrime {
    if ( n == 2 ) return true;
    else if ( n % 2 == 0 ) return false;
    else if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    }
 
 
    } if ( n == 2 ) return true;
    else if ( n % 2 == 0 ) return false;
    else if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    } n == 2 n 2 return true; true if ( n % 2 == 0 ) return false;
    else if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    } n % 2 == 0 n % 2 n 2 0 return false; false if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    } n < 9 n 9 return true; true if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    } n % 3 == 0 n % 3 n 3 0 return false; false {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    } for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        } int i = 5; int i = 5; i 5 i * i <= n i * i i i n i+=6 i+=6 i 6 {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        } {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        } if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false; n % i == 0 n % i n i 0 return false; false if ( n % (i+2) == 0 ) return false; n % (i+2) == 0 n % (i+2) n (i+2) i 2 0 return false; false return true; true int n n public class Main {
 
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
    private static StringTokenizer st;
 
    public static void main ( String [] args ) throws IOException
    {
    new Main().cal();
    }
 
  
    private void cal() throws IOException 
    {
    int N = Integer.parseInt(br.readLine());
    int [] nums = new int[N];
     
    for(int i = 0; i < N; i++)
        nums[i] = Integer.parseInt(br.readLine());
 
    int count = 0;
    for(int n : nums)
        if ( isPrime(n) ) count++;
 
    System.out.println(count);
 
    }
 
    private boolean isPrime(int n) {
    if ( n == 2 ) return true;
    else if ( n % 2 == 0 ) return false;
    else if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    }
 
 
    }
 
} public class Main {
 
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
    private static StringTokenizer st;
 
    public static void main ( String [] args ) throws IOException
    {
    new Main().cal();
    }
 
  
    private void cal() throws IOException 
    {
    int N = Integer.parseInt(br.readLine());
    int [] nums = new int[N];
     
    for(int i = 0; i < N; i++)
        nums[i] = Integer.parseInt(br.readLine());
 
    int count = 0;
    for(int n : nums)
        if ( isPrime(n) ) count++;
 
    System.out.println(count);
 
    }
 
    private boolean isPrime(int n) {
    if ( n == 2 ) return true;
    else if ( n % 2 == 0 ) return false;
    else if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    }
 
 
    }
 
} Main
import java.io.*;
import java.util.*;
 
public class Main {
 
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
    private static StringTokenizer st;
 
    public static void main ( String [] args ) throws IOException
    {
    new Main().cal();
    }
 
  
    private void cal() throws IOException 
    {
    int N = Integer.parseInt(br.readLine());
    int [] nums = new int[N];
     
    for(int i = 0; i < N; i++)
        nums[i] = Integer.parseInt(br.readLine());
 
    int count = 0;
    for(int n : nums)
        if ( isPrime(n) ) count++;
 
    System.out.println(count);
 
    }
 
    private boolean isPrime(int n) {
    if ( n == 2 ) return true;
    else if ( n % 2 == 0 ) return false;
    else if ( n < 9 ) return true;
    else if ( n % 3 == 0 ) return false;
    else {
        for(int i = 5; i * i <= n; i+=6) {
        if ( n % i == 0 ) return false;
        else if ( n % (i+2) == 0 ) return false;
        }
        return true;
    }
 
 
    }
 
}