Floating pointing incrementing, not working

probably you need to define the total counter as a global variable.

to be sure please post your code.