Wait for the right number of nodes to be available