Add an option for setting the max number of sources