That has nothing to do with your phone. It is all about your carrier/service provider. The messages get saved on their service, not on your phone.
To find out how many messages you can have in there, how long they are kept, if they are retrievable, etc., you will have to contact your carrier/service provider. Only they will know.
NOTE: Many have a limit of around 30 messages and will delete them after so many days. So be sure you ask your carrier/service provider all limitations/restrictions. In the end though, they will eventually be removed, so you should really save the information another way.