I’m pretty sure it does, but can’t say for certain. Even if it didn’t, you could always query the db, place the query object into an array, close the db connection, and use the length of the array as the number of returned records. I like doing it that way, just because it allows the connection to close before outputting the data.
That doesn’t sound like a very scalable option. You would either run a second query to obtain just the count or use found_rows as explained. That is the correct way to do things. Simply collecting everything in memory and iterating over it in the application language to count and throw away is not a good solution.