The basics are pretty straightforward: K3 counts three stitches. It's the shaping stitches: increases and decreases, and then more complex magic like cables and lace that can get wonky. I would nominate lace as the most complex counting task, even beyond general shaping, just because the number of stitches is constantly changing within a row, and it can make it difficult to use markers to help you. (See this article where I talk about how to use markers to help you have to count less!)
There are generally two counts of a row you can have - the count before you work it and the count after. If you are lucky enough to follow a generously written pattern, they will often tell you the stitch count you are supposed to have once you've completed some shaping instruction that changes the total stitch count.
Here are some guidelines of how to count particular stitches before AND after you knit them. The "Before count" means how many stitches you should have in your row before you've worked that instruction. The "After count" is how many sts you would count after working that stitch. For example, if my row instruction read: K3, K2tog, K6, ssk, K1. The "before count" would be: 3+2+6+2+1=14 sts. The "after count" would be 3+1+6+1+1=12 sts.
Counting in Lace patterns
The way that this is meaningful or helpful though, is when you are working your lace pattern, and something gets off. You may have missed a yo (the usual thing I miss) and it has offset the whole pattern. (See this blog entry for the story of when I had a lot of this type of pain). While it may require tinking to resolve, hopefully this method of counting can help you to find out more quickly when you have a counting error.