I found that using Serial.parseInt() reads in everything that you need. I also ended up reading in a float by using Serial.parseFloat() Esentially what it does is reads until it reaches a non int or non float character.
On matlab I ended up just using fprintf(s1, '%d\n', numSec);