Added several test cases for count and exists.