Many baby patterns are multi size patterns. The 31 stitches might be for a newborn size, the 35 for a 6 month size, for example. The larger size directions will be in parenthesis. The rest of your pattern will be, too. Print out your pattern and circle the correct numbers for the size you're using so you don't get confused.
For example. Your pattern will be sized for newborn, 3 month, and 6 month size. It will tell you to cast on 31 (35,37) stitches. 31 will be for newborn, 35 for 3 month, and 37 for 6 month size. Your pattern will say something like increase 1 (1,2). You'll increase 1 stitch for the newborn size, 1 for the 3 month size, and twice for the 6 month size.
Occasionally your pattern might say something like increase 0 (1,1) stitches. This means that for the newborn size, you won't do an increase. Hope this answers your question.