Is your feature request related to a problem?
#4737 support convert sort on aggregate measure to terms/multi-terms aggregate, #4265 removed the count aggregation for composite aggregate.
This issue is to combine them: Remove count aggregation for sort on aggregate measure