code: public static Integer computeShardIndex(final Key<CounterShardData> counterShardDataKey) {
          Preconditions.checkNotNull(counterShardDataKey);
  
          final String key = counterShardDataKey.getName();
  
          int lastDashIndex = key.lastIndexOf("-");
  
          final String shardIndexAsString = key.substring((lastDashIndex + 1), key.length());
          return Integer.valueOf(shardIndexAsString);
      }
docs: Helper method to compute the shard number index from an instance of {@link Key} of type {@link CounterShardData}.
  This method assumes that the "name" field of a counter shard key will end in a dash, followed by the shard
  index.
  
  @param counterShardDataKey
  @return