import java.util.Scanner;
import java.util.Arrays;

class Main {
  boolean[] primeTable;
  public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    PrimeNum prime = new PrimeNum(100000010);
    prime.createTable();
    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (prime.judge(num)) ct++;
    }
    System.out.println(ct);
  }
}

class PrimeNum {
  private boolean[] primeTable;
  private int maxNum;
  
  PrimeNum(int n) {
    primeTable = new boolean[n];
    Arrays.fill(primeTable, true);
    this.maxNum = n;
  }

  protected void createTable() {
    final double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (primeTable[i]){
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      }
    }
  }

  protected boolean judge(int n) {
    return (primeTable[n]);
  }

  protected int serch(int n) {
    for (int i = 2; i < maxNum; i++){
      if (primeTable[i]) n--;
      if (n == 0) return(i);
    }
    return (-1);
  }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main {
  boolean[] primeTable;
  public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    PrimeNum prime = new PrimeNum(100000010);
    prime.createTable();
    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (prime.judge(num)) ct++;
    }
    System.out.println(ct);
  }
} Main boolean[] primeTable; primeTable public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    PrimeNum prime = new PrimeNum(100000010);
    prime.createTable();
    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (prime.judge(num)) ct++;
    }
    System.out.println(ct);
  } main {
    Scanner cin = new Scanner(System.in);
    PrimeNum prime = new PrimeNum(100000010);
    prime.createTable();
    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (prime.judge(num)) ct++;
    }
    System.out.println(ct);
  } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) PrimeNum prime = new PrimeNum(100000010); prime new PrimeNum(100000010) prime.createTable() prime.createTable prime int n = cin.nextInt() n cin.nextInt() cin.nextInt cin ct = 0; ct 0 for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (prime.judge(num)) ct++;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int num = cin.nextInt();
      if (prime.judge(num)) ct++;
    } {
      int num = cin.nextInt();
      if (prime.judge(num)) ct++;
    } int num = cin.nextInt(); num cin.nextInt() cin.nextInt cin if (prime.judge(num)) ct++; prime.judge(num) prime.judge prime num ct++ ct System.out.println(ct) System.out.println System.out System System.out ct String[] args args class PrimeNum {
  private boolean[] primeTable;
  private int maxNum;
  
  PrimeNum(int n) {
    primeTable = new boolean[n];
    Arrays.fill(primeTable, true);
    this.maxNum = n;
  }

  protected void createTable() {
    final double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (primeTable[i]){
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      }
    }
  }

  protected boolean judge(int n) {
    return (primeTable[n]);
  }

  protected int serch(int n) {
    for (int i = 2; i < maxNum; i++){
      if (primeTable[i]) n--;
      if (n == 0) return(i);
    }
    return (-1);
  }
} PrimeNum private boolean[] primeTable; primeTable private int maxNum; maxNum PrimeNum(int n) {
    primeTable = new boolean[n];
    Arrays.fill(primeTable, true);
    this.maxNum = n;
  } PrimeNum {
    primeTable = new boolean[n];
    Arrays.fill(primeTable, true);
    this.maxNum = n;
  } primeTable = new boolean[n] primeTable new boolean[n] n Arrays.fill(primeTable, true) Arrays.fill Arrays primeTable true this.maxNum = n this.maxNum this this.maxNum n int n n protected void createTable() {
    final double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (primeTable[i]){
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      }
    }
  } createTable {
    final double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (primeTable[i]){
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      }
    }
  } final double sqrt_max = Math.sqrt(maxNum); sqrt_max Math.sqrt(maxNum) Math.sqrt Math maxNum for (int i = 2; i < sqrt_max; i++){
      if (primeTable[i]){
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      }
    } int i = 2; int i = 2; i 2 i < sqrt_max i sqrt_max i++ i++ i {
      if (primeTable[i]){
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      }
    } {
      if (primeTable[i]){
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      }
    } if (primeTable[i]){
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      } primeTable[i] primeTable i {
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      } for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false; int j = i * 2; int j = i * 2; j i * 2 i 2 j < maxNum j maxNum j += i j += i j i primeTable[j] = false; primeTable[j] = false primeTable[j] primeTable j false protected boolean judge(int n) {
    return (primeTable[n]);
  } judge {
    return (primeTable[n]);
  } return (primeTable[n]); (primeTable[n]) primeTable n int n n protected int serch(int n) {
    for (int i = 2; i < maxNum; i++){
      if (primeTable[i]) n--;
      if (n == 0) return(i);
    }
    return (-1);
  } serch {
    for (int i = 2; i < maxNum; i++){
      if (primeTable[i]) n--;
      if (n == 0) return(i);
    }
    return (-1);
  } for (int i = 2; i < maxNum; i++){
      if (primeTable[i]) n--;
      if (n == 0) return(i);
    } int i = 2; int i = 2; i 2 i < maxNum i maxNum i++ i++ i {
      if (primeTable[i]) n--;
      if (n == 0) return(i);
    } {
      if (primeTable[i]) n--;
      if (n == 0) return(i);
    } if (primeTable[i]) n--; primeTable[i] primeTable i n-- n if (n == 0) return(i); n == 0 n 0 return(i); (i) return (-1); (-1) 1 int n n
import java.util.Scanner;
import java.util.Arrays;

class Main {
  boolean[] primeTable;
  public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    PrimeNum prime = new PrimeNum(100000010);
    prime.createTable();
    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (prime.judge(num)) ct++;
    }
    System.out.println(ct);
  }
}

class PrimeNum {
  private boolean[] primeTable;
  private int maxNum;
  
  PrimeNum(int n) {
    primeTable = new boolean[n];
    Arrays.fill(primeTable, true);
    this.maxNum = n;
  }

  protected void createTable() {
    final double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (primeTable[i]){
        for (int j = i * 2; j < maxNum; j += i)
          primeTable[j] = false;
      }
    }
  }

  protected boolean judge(int n) {
    return (primeTable[n]);
  }

  protected int serch(int n) {
    for (int i = 2; i < maxNum; i++){
      if (primeTable[i]) n--;
      if (n == 0) return(i);
    }
    return (-1);
  }
}