in reply to Counting all records but selecting only a few

SELECT COUNT(*) from <table>;
That query is typically VERY fast.

I suggest you do that first, to get the count, then SELECT your last 500.

                Memory fault   --   brain fried