Dear Oli:
Simply producing the count of the number of lines produced by a query
would be quite independent of any column of the results. Perhaps you
want a ranking column that counts down the rows starting from 1. If
so, you might start from a query like this:
SELECT ID,
(SELECT COUNT(*) + 1 FROM YourTable T1
WHERE T1.ID < T.ID) AS Rank
FROM YourTable T
ORDER BY ID
Add other columns as desired
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts