If you would add a new field to all these datasources and populate the value based on some sequencing, that can be done.
However, your expectation is not really feasible if you would like to do it on-the-fly. AX typically loads 20 or 25 records into a buffer (unless you have a higher resolution screen, so more rows can fit in the grid), and you will not be able to determine how many records exist beforehand due to for example Filtering, so display method for returning this number is not going to work the way you expect.