Calculation of max number of nodes to collect