Add getNumKeys()

- Conversion to ui32 should be moved to own method