When writing, the first thing I think about is how long my story should be. Do I want a short story? A novella? A full-blown Steven King-sized novel? Do I have the patience to write that much about one thing? Do I have enough stuff in mind to fill that kind of book?
All of these question are the wrong questions. What you should always be thinking about is your writing. Don't worry about page length or how heavy your book is going to be when it's published. You're really getting ahead of yourself.
When I was little, somebody showed me how to make a little booklet by taking four or five pages of 8.5 x 11 printer paper, folding it in half and putting three staples into the “spine.” This always resulted in eight or ten pages of booklet that I would draw or write on.
Typically I would only use the first two or three pages, leaving the rest completely blank. I always felt like I was wasting paper (probably because I was), but I never wanted to continue drawing in the last few pages of the booklet because that book was finished. The same kind of psychology happens when you're writing with the explicit purpose of filling pages. If you're filling pages just for the sake of it, those are the pages that people will either skim or read a dozen times on accident while thinking about lunch. You want every single word to be important, so why waste pages?
If someone gave you a nice Moleskine notebook and you decided that you were going to write an entire story in it, you'd discover:
The story would end a few dozen pages before the end of the notebook, leaving room for doodles and grocery lists.
The story would NOT end before the end of the book, meaning you'd have to write the spillover in another notebook or on the computer, meaning your story is inconveniently located in two places (or three or four).
You want to write the story until you say what you wanted to say. If it just keeps going and going then people are going to know it.
Your story might total five pages; it might total five hundred. Either way, don't try to stretch or shrink anything (unless you're trying to write something for a writing contest, in which case they'll almost definitely make you cut down the word-count.)
The Goldilocks Zone is this: Not to long and not too short; juuuuuust right.