Support sort by count of collection field in Table View

For example, a database called A has a one-to-many field called B, there is 10 entity in the field.
Count of B will show in the Column button.
I want to sort by the number Count of B.

At the moment, the only solution is to create a formula field for this purpose.

This is a fabulous workaround.
Thanks.