I want display the result like below table
team name count
teams with ".com" present in one list say "COM" and team with ".in" is present in other list say "IN"
You can do that by creating a new field by which to sort the results. For example,
<your search> | eval sortField=case(like('team name',"%com"), 1, like('team name', "IN"), 2, 1=1, 99) | sort + sortField | fields - sortField | table "team name" count
The case statement can be expanded to include many more criteria, if desired. If you want to sort alphabetically, try this:
<your search> | rex field='team name' "\.(?<sortField>\w+) | sort + sortField | fields - sortField | table "team name" count