code: public long count() {
      if (SHOULD_CHECK) {
        checkNotClosed();
        txn.checkReady();
      }
      final NativeLongByReference longByReference = new NativeLongByReference();
      checkRc(LIB.mdb_cursor_count(ptrCursor, longByReference));
      return longByReference.longValue();
    }
docs: Return count of duplicates for current key.
  
  <p>
  This call is only valid on databases that support sorted duplicate data
  items {@link DbiFlags#MDB_DUPSORT}.
  
  @return count of duplicates for current key