code: private Map<Integer, Integer> getNodeIdToZonePrimaryCount(Cluster cluster,
                                                                StoreRoutingPlan storeRoutingPlan) {
          Map<Integer, Integer> nodeIdToZonePrimaryCount = Maps.newHashMap();
          for(Integer nodeId: cluster.getNodeIds()) {
              nodeIdToZonePrimaryCount.put(nodeId,
                                           storeRoutingPlan.getZonePrimaryPartitionIds(nodeId).size());
          }
  
          return nodeIdToZonePrimaryCount;
      }
docs: Go through all partition IDs and determine which node is "first" in the
  replicating node list for every zone. This determines the number of
  "zone primaries" each node hosts.
  
  @return map of nodeId to number of zone-primaries hosted on node.