import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();

    int[] x = new int[n];
    for (int i = 0; i < n; i++) {
        x[i] = sc.nextInt();
    }

    int cnt = 0;
    for (int i = 0; i < n; i++) {
        if (isPrime(x[i])) cnt++;
    }

    System.out.println(cnt);
  }

  public static boolean isPrime(int n) {
      if (n == 1) return false;
      
      for (int i = 2; i <= Math.sqrt(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[] x = new int[n];
    for (int i = 0; i < n; i++) {
        x[i] = sc.nextInt();
    }

    int cnt = 0;
    for (int i = 0; i < n; i++) {
        if (isPrime(x[i])) cnt++;
    }

    System.out.println(cnt);
  }

  public static boolean isPrime(int n) {
      if (n == 1) return false;
      
      for (int i = 2; i <= Math.sqrt(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[] x = new int[n];
    for (int i = 0; i < n; i++) {
        x[i] = sc.nextInt();
    }

    int cnt = 0;
    for (int i = 0; i < n; i++) {
        if (isPrime(x[i])) cnt++;
    }

    System.out.println(cnt);
  } main {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();

    int[] x = new int[n];
    for (int i = 0; i < n; i++) {
        x[i] = sc.nextInt();
    }

    int cnt = 0;
    for (int i = 0; i < n; i++) {
        if (isPrime(x[i])) cnt++;
    }

    System.out.println(cnt);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] x = new int[n]; x new int[n] n for (int i = 0; i < n; i++) {
        x[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        x[i] = sc.nextInt();
    } {
        x[i] = sc.nextInt();
    } x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 for (int i = 0; i < n; i++) {
        if (isPrime(x[i])) cnt++;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        if (isPrime(x[i])) cnt++;
    } {
        if (isPrime(x[i])) cnt++;
    } if (isPrime(x[i])) cnt++; isPrime(x[i]) isPrime x[i] x i cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public static boolean isPrime(int n) {
      if (n == 1) return false;
      
      for (int i = 2; i <= Math.sqrt(n); i++) {
          if (n % i == 0) return false;
      }
      return true;
  } isPrime {
      if (n == 1) return false;
      
      for (int i = 2; i <= Math.sqrt(n); i++) {
          if (n % i == 0) return false;
      }
      return true;
  } if (n == 1) return false; n == 1 n 1 return false; false for (int i = 2; i <= Math.sqrt(n); i++) {
          if (n % i == 0) return false;
      } int i = 2; int i = 2; i 2 i <= Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math 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[] x = new int[n];
    for (int i = 0; i < n; i++) {
        x[i] = sc.nextInt();
    }

    int cnt = 0;
    for (int i = 0; i < n; i++) {
        if (isPrime(x[i])) cnt++;
    }

    System.out.println(cnt);
  }

  public static boolean isPrime(int n) {
      if (n == 1) return false;
      
      for (int i = 2; i <= Math.sqrt(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[] x = new int[n];
    for (int i = 0; i < n; i++) {
        x[i] = sc.nextInt();
    }

    int cnt = 0;
    for (int i = 0; i < n; i++) {
        if (isPrime(x[i])) cnt++;
    }

    System.out.println(cnt);
  }

  public static boolean isPrime(int n) {
      if (n == 1) return false;
      
      for (int i = 2; i <= Math.sqrt(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[] x = new int[n];
    for (int i = 0; i < n; i++) {
        x[i] = sc.nextInt();
    }

    int cnt = 0;
    for (int i = 0; i < n; i++) {
        if (isPrime(x[i])) cnt++;
    }

    System.out.println(cnt);
  }

  public static boolean isPrime(int n) {
      if (n == 1) return false;
      
      for (int i = 2; i <= Math.sqrt(n); i++) {
          if (n % i == 0) return false;
      }
      return true;
  }
}
