Added disabling of counts, configurable min/max, and display of query in legend