I spent about fifteen to twenty years being frustrated about the fact that I could hear in my head how I wanted music to emerge from my instrument, but couldn't make it go that way, and that I can't count at all well.
What changed it for me was sitting in my kids' piano lessons, and observing the little changes their teacher asked them to make - small but very effective - in order to help them get over gremlins. Her counting method worked for me - I don't still use it, but it got me started, and I began to realise that one of the best ways to get over any stumbling block is to take a step back from it, slow right down, focus on that bit and pick it to pieces. Thus for a melodic line with lots of alternating leaps up and down, I might play the series of high notes all in a row, without the low ones between, then swap. For a difficult fingering which produces mud if not co-ordinated exactly, I slow down until it is neat, and gradually crank up the speed until it works at the rate it needs to go. For a tricky run of notes, I will sometimes approach it from the end and add more and more notes to the beginning of it. I also have a book of studies, from which I use exercises when a particular gremlin is bothering me. I was always too impatient before, and imagined that doing the same run again and again would get it right eventually, but all that approach did was to ingrain a series of mistakes. I think that as we get better, there will be more and more tricky moments to deal with, but we can also get better at coping with them - it just needs patience. (oh, and a metronome is very useful!)
Last night my husband and I played through a couple of the pieces I'd done for my diploma exam - one of them I have hardly looked at since, and yet it went like a dream - I've discovered how to learn properly at last.