It seemed like no matter how many times I'd count the stitches in long rows I'd always end up having to add one or two by the time I got to the end of the row.
So for a shawl without a centre seam where the pattern is positioned after a row of increases and a repeat of up to 10 stitches, I don't count all the stitches. I just work until I have finished a repeat and am about 50 stitches from the end. Then I see whether I have the right number of stitches to work the edge stitches. and full repeats. If not I work a few extra increases/decreases to get the right number (spread over about 50 stitches the extra stitches will not be noticeable).
If I need a repeat of 9 and I realise I have 6 extra stitches the I'll increase 3 for another repeat, but if I have only 3 extra then I decrease three.
For a repeat of 9 at most I will be adjusting by 4.
Because the extra increases/decreases are worked after a row of increases they won't really be noticeable.