Hey @CMSGuy
So, to count the number of items, you can use the following expression in a compose action:
length(outputs('Get_items')?['body/value'])

As far as I understood your scenario, you are using do until till you reach your last item.
So, what you can do is first count the number of items coming from get items, by the above expression, then just use increment variable to increase the variables count by everytime the number of items coming in get items.
So, lets say there are 12000 items, the loop will run, give you 5000, you increment the variable with that 5000, next time loop runs, again 5000 will be added to the variable, and for the last time 2000 items will be there, then it will just increment the 2000, so in total 12000 items. Below adding screenshot for what you can do, as far as I understood the scenario.

Below 1st taking count of get items, then incrementing the variables value with the count of get items.

If this was the solution you were looking for, you can mark this as a solution and if you liked the explanation, you can give a thumbs up. 🙂