code: public long countClass(final String iClassName) {
      final OClass cls = getMetadata().getSchema().getClass(iClassName);
  
      if (cls == null)
        throw new IllegalArgumentException("Class '" + iClassName + "' not found in database");
  
      return cls.count();
    }
docs: Returns the number of the records of the class iClassName.