Test case for db#count