private long calculateDataNodeCount() {
    long count = 0;
    for (Datacenter datacenter : datacenters) {
      count += datacenter.getDataNodes().size();
    }
    return count;
  }
An Ambry hardwareLayout consists of a set of {@link Datacenter}s.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HardwareLayout.java