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

This is to be able to resume from a partially replicated database after a restart.
Also, I prefer initializer style to assignment style. :smiley: