code: public MetricDatum withCounts(Double... counts) {
          if (this.counts == null) {
              setCounts(new com.amazonaws.internal.SdkInternalList<Double>(counts.length));
          }
          for (Double ele : counts) {
              this.counts.add(ele);
          }
          return this;
      }
docs: <p>
  Array of numbers that is used along with the <code>Values</code> array. Each number in the <code>Count</code>
  array is the number of times the corresponding value in the <code>Values</code> array occurred during the period.
  </p>
  <p>
  If you omit the <code>Counts</code> array, the default of 1 is used as the value for each count. If you include a
  <code>Counts</code> array, it must include the same amount of values as the <code>Values</code> array.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setCounts(java.util.Collection)} or {@link #withCounts(java.util.Collection)} if you want to override the
  existing values.
  </p>
  
  @param counts
  Array of numbers that is used along with the <code>Values</code> array. Each number in the
  <code>Count</code> array is the number of times the corresponding value in the <code>Values</code> array
  occurred during the period. </p>
  <p>
  If you omit the <code>Counts</code> array, the default of 1 is used as the value for each count. If you
  include a <code>Counts</code> array, it must include the same amount of values as the <code>Values</code>
  array.
  @return Returns a reference to this object so that method calls can be chained together.