Mostly the stitch gauge is more important because you can always knit more rows or less; the lengths in a pattern are usually given as a measurement not how many rows.
It's a good idea to use more stitches that the gauge gives, the idea is to find out how many stitches you have in 4", not to make a 4" square. The edge stitches shouldn't be included in the measurement because they curl under and aren't the same size as stiches in the middle. So for these patterns you'd want to cast on at least 20 sts, 24 is better, and measure across 4" in the center of the piece.
sue- knitting heretic