quick implementation of minimum and maximum number of selected areas, conditions affect select, deselect, toggle, set and mouseclick