When you change from knitting to purling (and vice versa) be sure to bring the yarn
between the needles. You may be bringing the yarn over the needle when you change stitch pattern. That can create a yarn over which looks like an extra st on the needle and since you change pattern about 11 times that would account for your extra sts. Here's a
video for ribbing but it shows you what between the needles looks like when you switch from one st to the other..