Count the number of values generated in each of the ranges, with arbitrary number of arbitrary ranges