Add pure C++ implementation of count decimal digit