Once you have a query result you can do a check to see if there are any results (rows). Open sqlprintr.php and save it as sqlnumrows.php.
Delete the while loop (all of it). In it's place put this:
Save, upload and try. You should see just a number. That is how many records there were in the table.