python count significant digits