Your if statements should look more like this:
(you must change the y<=X<= z statements but you don't absolutely have to have the else if, but it's more efficient if you don't have to go through a bunch of if statements)
if ( comission <= 299 )
++count1;
else if ( comission>=300 && comission <= 399 )
++count2;
else if ( comission >=400 && comission <= 499 )
++count3;
etc.