Are SMS and MMS sent via a mobile phone stored on telecommunication service providers' servers before passing them to the recipient?
Does it depend on the country or does every network service provider have the resources to do something like this?
The telecommunications service provider (your cell phone company) has to transmit the SMS and MMS messages to their recipients; so yes, the provider has to store them, however briefly.
Most providers retain messages for varying, not-so-brief, periods of time.
Search [sms carrier retention period].
If a phone is not on the network messages must be stored until they can be delivered, so SMSCs and MMSCs have storage capabilities. SMS and MMS messages can be retained indefinitely on the system or they can be exported to an archive if the carrier chooses. If governments are storing phone call records they are almost certainly retaining SMS and MMS messages.
In addition to that, in an effort to secure the homeland, the NSA collects 200 million text messages per day.
Yes, It does vary from country to country. For example I know that in Portugal text messages are stored on the provider for up to 7 years and only with a warrant can one access that information.