If you have moved the staring point to 47 then the original count has to go to 47 as well and then 47 =48+3, 48 = 49+ 3, 49 = 50 + 3
It is the first line after x = count2 * 2 that you have changed it was 46 = 47 + x and you made it 47 = 47 + x and then the others have to follow that.