Arduino GSM SIM900 receiving text and then storing value as a variable in code

The Serial Input Basics tutorial will help.