Hi RVS77 and welcome!
I think the hard limit from memory is in the range of about 35 devices but connecting that many devices at once is a sure fire way to kill the speed of the wireless network as each device has to contend with the others for airtime to broadcast their signals to the modem. I haven't tried with the TG797 but I found the wireless on the TG799 was a lot worse with Telstra Air enabled but that might just have been my home config which since we are renting I can't do much about!
Hope this helps!