Add test case for db#count