select count(*) from ec_subcategories where category_id=:category_id and sort_key = :sort_key