Practically there is ~no~ hard-coded limitation. Performance is the natural border. Usually 5 000 000 000 rows would crash even the strongest processor with the memory exhausted issue.
Keep in mind that QS has a sort of 'smart display' which doesn't display all rows, rather you have to click on 'Show More' so it's a form of overload risk mitigation.