Fix FileIO counter never reseted

The internal counter used in the FileIO class was never reseted when the rest of the application was defaulted or when a file was reloaded or a new file loaded. This caused the results of the calculations exponentially go wrong.
Calculations now happen in float types.

Result now can be a decimal number. No longer limited to integers and rounding of the value.