New knitters often don't know this so it's nice that you brought it up to share.
It's a multiple of 4 (2 knits and 2 purls) so you need to have a stitch count that will work. The same holds true of any rib pattern..
k1p1 - multiple of 2
k2p1 - multiple of 3
k2p2 - multiple of 4
etc....
One thing to note... if you are knitting in the round this stitch count is critical so the ribbing will look right. If you are knitting flat there may be times that you want the edges to match - like on a cardigan for instance and you want both front edges to be knits you could change it to this -
k1p1 +1
k2p2 +2
k2p1 +2 The + numbers make the pattern end in knit stitches. You just increase for the number of knits in the rib pattern. The other side however would have purls as the starting stitches so keep that in mind.