Support counts.

Closes: #3
Merge pull request #4 from Julian/count

Support counts.