template <class T> T countDigits(T number) { return T(log10(number) + 1); } //If the number is very large, use string