Add a method to get the tree size of the local database.

ISTR `TreeSize()` is const, so this could be `const&` if you liked.