Writing is the same. The path between the beginning and the end is fraught with peril, scenic byways, speeding freeways, and crumbling back roads choked with alligators. Unless you have a goal, you're venturing forth into the country of your storytelling without a map. You can't get where you want to go if you don't know where you're going in the first place. Someone said that, I'm sure. It was probably pithier before I got hold of it, too. Okay. So you need a goal. Fine, you say. Goal = write the thing. Now what?
Now you map out a route. Whether it's via an outline, a plot sketch, a synopsis, or a loosely held notion of A happens, then B, then C, you must be the GPS for your story. Our destination lies yonder, therefore, we will get there via this plot twist over here. We'll stop and stare into the abyss at this point before pitching the characters off the metaphorical story cliff. Yay!
Then. Then you have to drive.
Until someone invents that teleporter, or a room full of monkeys spontaneously generates Shakespeare, the only way from beginning to end is to put in the hours - whether driving or writing. Here's the thing. On the west coast, if I want to get from Seattle to LA, I can take I-5 or I can take 101 down the coast. 101 is gorgeous. And winding and slow and jammed with logging trucks and motorhomes. It takes days. I-5 is FAST. And some of the brownest, flattest, ugliest stretch of freeway available in the United States. Some days, it's worth going fast. Some days, it's not. Stories are the same way.
Your journey is just as important as your destination. Enjoy it. If you aren't enjoying it, change it until you are. Reaching your goals is a lot easier when you're having a good time.
AM Update: You know what? There's more to this. Look. You know how to set goals. We all do. Sure, sure. If you need help setting realistic goals, Google that. The techniques for SMART goals are all over the interwebs. Avail yourself of them. But when it comes to making tracks, to actually doing the work, there are a couple of tricks you can use.
1. Immersion - keep your head in the story. When you close your eyes at night, put yourself in the story where you last left your heroes and play through scenarios until one tickles your fancy. Keep a notepad beside the bed.
2. Front load the work - at the end of each writing session, I take a few long hand notes about where the story wants or needs to go next. There may be notes about a scene I missed and want to add. Whatever.
3. Treat the writing and yourself seriously. When you sit down to write, clock in. Keep a notepad, spreadsheet, or whatever works for you. Write down when you start writing. Not when you turn on the PC and start surfing FB. When you start writing. Every time you lose focus and stop writing, jot down the time and your word count. Note what distracted you. 'Need tea', 'bio break'. Take 5. Then sit back down. Write down the time and get back to work. You're developing a data set about what bumps you out of the work so you can tweak your environment to support your focus.
4. If you get stuck it's because you don't have a plan/don't know where you're going. Take 10 minutes and free flow with pen and paper on what could happen next in your story.
There are more, but these are the start of 'how to keep to word count per day' goals.