Add count command on DB API.

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