Added an initial version of getStats() to the C++ interface.