Group By and Count in a range