Implement count().