public int getSelectedUnitsCount() {
        if (selectedUnitsBuilder_ == null) {
          return selectedUnits_.size();
        } else {
          return selectedUnitsBuilder_.getCount();
        }
      }