Complete the method definition given below.
Given an integer count, increment the same by 1 and add it to the present count value. Continue the same till count value reaches maximum count. The method should return the final sum.
Note:
- The count should increment atleast once irrespective of the maximum count.
- Order matters: You need to first increment count, and then get the sum.