Hello,
Okay I understand your use case.
I did some tests but I couldn't quite get it to work correctly. But here is what I have so far and maybe you can build upon it:
I have one service that is getting the list data. I also use this service to get its "selected rows" and also the latest selected row. (this doesn't quite work, more on that later).

I then have this counter service that will count how many rows are selected:

This service contain this:
if (Input.length > 6) {
let tempTable = Input;
for (i = 0; i < tempTable.length; i++) {
if (tempTable.rows[i].name == LatestSelected) {
tempTable.RemoveRow(i);
}
}
result = tempTable;
} else {
result = Input;
}
Basically we are checking each row from the input if we have selected more than six rows and finding the latest selected row and remove it from the selected list. We then send the selected rows (minus the 7th) back out and give it to the selected rows in the list:

This seems to work fine and will give you a list with just the first six selected rows.
But back to the previous issue that I said earlier.
It seems like if you select the first row in the list first, and then other rows in the list, the "last selected row" will always be the first row.
But if you select anything other than the first row, this seems to work.
I didn't have enough time to spend on this. But maybe you could fix that issue somehow, then this should work for your use case.