Add a new method for interval different number counting problem.