code: @InterfaceAudience.Public
      public int getTotalRows() {
          try {
              updateIndex();
          } catch (CouchbaseLiteException e) {
              Log.e(Log.TAG_VIEW, "Update index failed when getting the total rows", e);
          }
          return getCurrentTotalRows();
      }
docs: Get total number of rows in the view. The view's index will be updated if needed
  before returning the value.