@Override
  protected void addOptions() {
    Option startTimeOption = Option.builder(null).valueSeparator('=').hasArg(true)
      .desc("starting time filter to start counting rows from.").longOpt(OPT_START_TIME).build();
    Option endTimeOption = Option.builder(null).valueSeparator('=').hasArg(true)
      .desc("end time filter limit, to only count rows up to this timestamp.").longOpt(OPT_END_TIME)
      .build();
    Option rangeOption = Option.builder(null).valueSeparator('=').hasArg(true)
      .desc("[startKey],[endKey][;[startKey],[endKey]...]]").longOpt(OPT_RANGE).build();
    Option expectedOption = Option.builder(null).valueSeparator('=').hasArg(true)
      .desc("expected number of rows to be count.").longOpt(OPT_EXPECTED_COUNT).build();
    Option countDeleteMarkersOption = Option.builder(null).hasArg(false)
      .desc("counts the number of Delete Markers of all types, i.e. "
        + "(DELETE, DELETE_COLUMN, DELETE_FAMILY, DELETE_FAMILY_VERSION)")
      .longOpt(OPT_COUNT_DELETE_MARKERS).build();
    addOption(startTimeOption);
    addOption(endTimeOption);
    addOption(rangeOption);
    addOption(expectedOption);
    addOption(countDeleteMarkersOption);
  }
Sets filter {@link FilterBase} to the {@link Scan} instance. If provided rowRangeList contains
more than one element, method sets filter which is instance of {@link MultiRowRangeFilter}. If
rowRangeList contains exactly one element, startRow and stopRow are set to the scan. Also,
method may apply {@link FirstKeyOnlyFilter} an {@link KeyOnlyFilter} for better performance.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java