To follow up with this, is there a way to add a sorting solution/functionality to this?
For example if you have thousands of orders and want to sort by the order count, would that be possible by adjusting the code?