 import java.util.*;
class Main{
  public static void main(String args[]){
    int count = 0;
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int a[] = new int[n];

    for(int i = 0; i<n; i++){
      a[i] = sc.nextInt();
      if(Judge_Prime(a[i])==1)count++;
    }
    System.out.println(count);
  }
  static int Judge_Prime (int n){
    int i;
    if (n < 2){
      return 0;
    }else if (n == 2){
      return 1;
    }

    if (n % 2 == 0){
      return 0;
    }

    for (i = 3; i <= n / i; i += 2){
      if (n % i == 0){
        return 0;
      }
    }
      return 1;
  }
} import java.util.*; util.* java class Main{
  public static void main(String args[]){
    int count = 0;
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int a[] = new int[n];

    for(int i = 0; i<n; i++){
      a[i] = sc.nextInt();
      if(Judge_Prime(a[i])==1)count++;
    }
    System.out.println(count);
  }
  static int Judge_Prime (int n){
    int i;
    if (n < 2){
      return 0;
    }else if (n == 2){
      return 1;
    }

    if (n % 2 == 0){
      return 0;
    }

    for (i = 3; i <= n / i; i += 2){
      if (n % i == 0){
        return 0;
      }
    }
      return 1;
  }
} Main public static void main(String args[]){
    int count = 0;
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int a[] = new int[n];

    for(int i = 0; i<n; i++){
      a[i] = sc.nextInt();
      if(Judge_Prime(a[i])==1)count++;
    }
    System.out.println(count);
  } main {
    int count = 0;
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int a[] = new int[n];

    for(int i = 0; i<n; i++){
      a[i] = sc.nextInt();
      if(Judge_Prime(a[i])==1)count++;
    }
    System.out.println(count);
  } int count = 0; count 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int a[] = new int[n]; a new int[n] n for(int i = 0; i<n; i++){
      a[i] = sc.nextInt();
      if(Judge_Prime(a[i])==1)count++;
    } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
      a[i] = sc.nextInt();
      if(Judge_Prime(a[i])==1)count++;
    } {
      a[i] = sc.nextInt();
      if(Judge_Prime(a[i])==1)count++;
    } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc if(Judge_Prime(a[i])==1)count++; Judge_Prime(a[i])==1 Judge_Prime(a[i]) Judge_Prime a[i] a i 1 count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args static int Judge_Prime (int n){
    int i;
    if (n < 2){
      return 0;
    }else if (n == 2){
      return 1;
    }

    if (n % 2 == 0){
      return 0;
    }

    for (i = 3; i <= n / i; i += 2){
      if (n % i == 0){
        return 0;
      }
    }
      return 1;
  } Judge_Prime {
    int i;
    if (n < 2){
      return 0;
    }else if (n == 2){
      return 1;
    }

    if (n % 2 == 0){
      return 0;
    }

    for (i = 3; i <= n / i; i += 2){
      if (n % i == 0){
        return 0;
      }
    }
      return 1;
  } int i; i if (n < 2){
      return 0;
    }else if (n == 2){
      return 1;
    } n < 2 n 2 {
      return 0;
    } return 0; 0 if (n == 2){
      return 1;
    } n == 2 n 2 {
      return 1;
    } return 1; 1 if (n % 2 == 0){
      return 0;
    } n % 2 == 0 n % 2 n 2 0 {
      return 0;
    } return 0; 0 for (i = 3; i <= n / i; i += 2){
      if (n % i == 0){
        return 0;
      }
    } i = 3; i = 3 i 3 i <= n / i i n / i n i i += 2 i += 2 i 2 {
      if (n % i == 0){
        return 0;
      }
    } {
      if (n % i == 0){
        return 0;
      }
    } if (n % i == 0){
        return 0;
      } n % i == 0 n % i n i 0 {
        return 0;
      } return 0; 0 return 1; 1 int n n
 import java.util.*;
class Main{
  public static void main(String args[]){
    int count = 0;
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int a[] = new int[n];

    for(int i = 0; i<n; i++){
      a[i] = sc.nextInt();
      if(Judge_Prime(a[i])==1)count++;
    }
    System.out.println(count);
  }
  static int Judge_Prime (int n){
    int i;
    if (n < 2){
      return 0;
    }else if (n == 2){
      return 1;
    }

    if (n % 2 == 0){
      return 0;
    }

    for (i = 3; i <= n / i; i += 2){
      if (n % i == 0){
        return 0;
      }
    }
      return 1;
  }
}
