int counters[4];

you will increase counter[0] for range 0-24, counter[1] for 25-49 etc