the API itself does not have built-in functionality to sort by taxonomy, and even if it did sort by taxonomy, the sorting would not be a true taxonomic sort. instead, it would be a sort based on either the IDs or names of the taxa at any given level in the tree.
that said, you can do this kind of pseudo-taxonomic sorting, if you like, since the API response does include the ancestry for each taxon. i’m not planning to change the page that i referenced earlier, since i think that would go beyond the scope of what the page is intended to do, but you’re welcome to adapt the code to display the ancestry, or sort by ancestry, as you like. there’s also a similar page for taxa that includes code to export a taxon list as CSV, which you could adapt if you think it’s useful.
if you’re not comfortable coding, then you could get a list of taxa one way or another, and then use that to look up the ancestry for the taxa returned by the species count page. once you have the ancestry, you can sort however you like.
you can also work with the API on your own. there are various tools you can use to do this. even a tool like Excel can be used to get data from the API.