Counts endpoint for API.