import java.util.*;

public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.nextLine());
      int counter = 0;
      
      for(int i = 0; i < n; i ++) {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      }
      
      System.out.println(counter);
   }
   
   public static boolean isPrime(int a) {
      if(a == 2) {
         return true;
      } else if(a == 1 || a % 2 == 0) {
         return false;
      } else {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      }
   }
   
} import java.util.*; util.* java public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.nextLine());
      int counter = 0;
      
      for(int i = 0; i < n; i ++) {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      }
      
      System.out.println(counter);
   }
   
   public static boolean isPrime(int a) {
      if(a == 2) {
         return true;
      } else if(a == 1 || a % 2 == 0) {
         return false;
      } else {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      }
   }
   
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.nextLine());
      int counter = 0;
      
      for(int i = 0; i < n; i ++) {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      }
      
      System.out.println(counter);
   } main {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.nextLine());
      int counter = 0;
      
      for(int i = 0; i < n; i ++) {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      }
      
      System.out.println(counter);
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int counter = 0; counter 0 for(int i = 0; i < n; i ++) {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      } int i = 0; int i = 0; i 0 i < n i n i ++ i ++ i {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      } {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      } int key = Integer.parseInt(sc.nextLine()); key Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc if(isPrime(key)) {
            counter ++;
         } isPrime(key) isPrime key {
            counter ++;
         } counter ++ counter System.out.println(counter) System.out.println System.out System System.out counter String[] args args public static boolean isPrime(int a) {
      if(a == 2) {
         return true;
      } else if(a == 1 || a % 2 == 0) {
         return false;
      } else {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      }
   } isPrime {
      if(a == 2) {
         return true;
      } else if(a == 1 || a % 2 == 0) {
         return false;
      } else {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      }
   } if(a == 2) {
         return true;
      } else if(a == 1 || a % 2 == 0) {
         return false;
      } else {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      } a == 2 a 2 {
         return true;
      } return true; true if(a == 1 || a % 2 == 0) {
         return false;
      } else {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      } a == 1 || a % 2 == 0 a == 1 a 1 a % 2 == 0 a % 2 a 2 0 {
         return false;
      } return false; false {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      } for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         } int i = 3; int i = 3; i 3 i <= (int)Math.sqrt(a) i (int)Math.sqrt(a) Math.sqrt Math a i += 2 i += 2 i 2 {
            if(a % i == 0) {
               return false;
            }
         } {
            if(a % i == 0) {
               return false;
            }
         } if(a % i == 0) {
               return false;
            } a % i == 0 a % i a i 0 {
               return false;
            } return false; false return true; true int a a public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.nextLine());
      int counter = 0;
      
      for(int i = 0; i < n; i ++) {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      }
      
      System.out.println(counter);
   }
   
   public static boolean isPrime(int a) {
      if(a == 2) {
         return true;
      } else if(a == 1 || a % 2 == 0) {
         return false;
      } else {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      }
   }
   
} public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.nextLine());
      int counter = 0;
      
      for(int i = 0; i < n; i ++) {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      }
      
      System.out.println(counter);
   }
   
   public static boolean isPrime(int a) {
      if(a == 2) {
         return true;
      } else if(a == 1 || a % 2 == 0) {
         return false;
      } else {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      }
   }
   
} Main
import java.util.*;

public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.nextLine());
      int counter = 0;
      
      for(int i = 0; i < n; i ++) {
         int key = Integer.parseInt(sc.nextLine());
         if(isPrime(key)) {
            counter ++;
         }
      }
      
      System.out.println(counter);
   }
   
   public static boolean isPrime(int a) {
      if(a == 2) {
         return true;
      } else if(a == 1 || a % 2 == 0) {
         return false;
      } else {
         for(int i = 3; i <= (int)Math.sqrt(a); i += 2) {
            if(a % i == 0) {
               return false;
            }
         }
         return true;
      }
   }
   
}
