Add count command to DB API.

This API can be used as find or findOne, but it returns the number of the
matching document.  It uses count command internally, so it's more efficient
than using find and getting the length of the result.

This patch also adds an example of using count command.