Add count to document with tests.

Feature proposed in PR #110 but using the highlevel API.