In iOS 4.x and earlier you were limited to having just the last 200 recent messages on your iOS device. With iOS 5 you can now increase that to the 1,000 Recent messages or 500 recent messages. The options are now
50 Recent Messages
100 Recent Messages
200 Recent Messages
500 Recent Messages
1,000 Recent Messages
To get to this option go to the Settings App:
Settings --> Mail, Contacts, Calendars --> Show
And then select the number of Recent Messages you want to be stored on your iOS device.