The point is; rows in a database do not have a number, because their 'number' depends on what you order it by.
SELECT name FROM users ORDER BY name ASC;
would bean that 'aaa' is record #1, but when you do
SELECT name FROM users ORDER BY name DESC;
that same 'aaa' record is now the last record.
You should add the 'number' while you are printing the results, but that is the only place where that number makes sense.
After running the a query, the first result you get is record #1, the second is #2 and so on.
If you have a query like
SELECT name FROM users WHERE name='bbb';
then you can only find out what the record number is by building a query to find out how many records you would have printed before 'bbb' if you would print all records.
something like
SELECT count(*) FROM users WHERE name < 'bbb' ORDER BY name ASC;
But, whenever a records is inserted or deleted, this numebr changes immediately, so you cannot use the number for anythjing other than an indication of how many records you have.