Implement faster way to count decimals

Parsing strings to get decimals is a lot slower!