public int size() {
    return locations.length;
  }
Returns the size of the list even if some of the elements might be null.
@return the size of the list (corresponding to the max replicaId)
hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLocations.java