remove trailing slash on url for get_categories_count

Trailing slash is resulting in 404 response.