Updated the getTotalNumberOfDocs method. Now takes a boolean value (which indicates whether we're looking at the user table) and returns the desired value