added option for maximum or exact number of stops for a param