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