When I start a new story, I try to figure out how long I want it. Then set a day for when I want it complete. Usually two months or so. After that I can find out how many words per day I need to write to meet that goal. If I go over it’s great, and I just bank those words and keep trying to get my daily word count. If I don’t make the count, then at least I have those words banked and it shouldn’t affect my goal. I try to aim for about 1200 words per day.
I don’t always manage to do it. I started a sci fi story that I just couldn’t get off the ground. I realized I needed to do more prewriting for it and moved on to something else. At that point just finishing something (anything!) was the most important thing to me.