Implement count and counts. Closes #8.