Update api.rst

Added doc on count feature