import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;

public class Main {

  public static boolean is_prime(int k) {
    for (int i=2; i*i<=k; i++) 
    if (k%i == 0) return false;
    return k != 1;
  }

  public static void main(String[] args) {
    int i;
    int res = 0;
    Scanner sc = new Scanner(System.in); 
    int n = Integer.parseInt(sc.next());;
    for (i=0; i<n; i++) {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    }
    System.out.println(res);
  }
} import java.util.*; util.* java import java.io.*; io.* java import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Collections.*; import static java.util.Collections.*; import static java.util.Collections.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main {

  public static boolean is_prime(int k) {
    for (int i=2; i*i<=k; i++) 
    if (k%i == 0) return false;
    return k != 1;
  }

  public static void main(String[] args) {
    int i;
    int res = 0;
    Scanner sc = new Scanner(System.in); 
    int n = Integer.parseInt(sc.next());;
    for (i=0; i<n; i++) {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    }
    System.out.println(res);
  }
} Main public static boolean is_prime(int k) {
    for (int i=2; i*i<=k; i++) 
    if (k%i == 0) return false;
    return k != 1;
  } is_prime {
    for (int i=2; i*i<=k; i++) 
    if (k%i == 0) return false;
    return k != 1;
  } for (int i=2; i*i<=k; i++) 
    if (k%i == 0) return false; int i=2; int i=2; i 2 i*i<=k i*i i i k i++ i++ i if (k%i == 0) return false; if (k%i == 0) return false; k%i == 0 k%i k i 0 return false; false return k != 1; k != 1 k 1 int k k public static void main(String[] args) {
    int i;
    int res = 0;
    Scanner sc = new Scanner(System.in); 
    int n = Integer.parseInt(sc.next());;
    for (i=0; i<n; i++) {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    }
    System.out.println(res);
  } main {
    int i;
    int res = 0;
    Scanner sc = new Scanner(System.in); 
    int n = Integer.parseInt(sc.next());;
    for (i=0; i<n; i++) {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    }
    System.out.println(res);
  } int i; i int res = 0; res 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (i=0; i<n; i++) {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    } i=0; i=0 i 0 i<n i n i++ i++ i {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    } {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    } int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if (is_prime(a)) res++; is_prime(a) is_prime a res++ res System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

  public static boolean is_prime(int k) {
    for (int i=2; i*i<=k; i++) 
    if (k%i == 0) return false;
    return k != 1;
  }

  public static void main(String[] args) {
    int i;
    int res = 0;
    Scanner sc = new Scanner(System.in); 
    int n = Integer.parseInt(sc.next());;
    for (i=0; i<n; i++) {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    }
    System.out.println(res);
  }
} public class Main {

  public static boolean is_prime(int k) {
    for (int i=2; i*i<=k; i++) 
    if (k%i == 0) return false;
    return k != 1;
  }

  public static void main(String[] args) {
    int i;
    int res = 0;
    Scanner sc = new Scanner(System.in); 
    int n = Integer.parseInt(sc.next());;
    for (i=0; i<n; i++) {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    }
    System.out.println(res);
  }
} Main
import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;

public class Main {

  public static boolean is_prime(int k) {
    for (int i=2; i*i<=k; i++) 
    if (k%i == 0) return false;
    return k != 1;
  }

  public static void main(String[] args) {
    int i;
    int res = 0;
    Scanner sc = new Scanner(System.in); 
    int n = Integer.parseInt(sc.next());;
    for (i=0; i<n; i++) {
      int a = Integer.parseInt(sc.next());;
      if (is_prime(a)) res++;
    }
    System.out.println(res);
  }
}