As many as it takes to tell the story, and no more.
I have read stories that have gone on too long, and they leave me disinclined to read books by that author again.
I’ve also read stories that have ended too quickly. With those, I am only too keen to read something else by the author.
The too-long stories are generally bogged down by too much irrelevant detail—too many subplots that don’t related to the main characters, or too many characters. I remember one that was over 500 pages, and kept introducing more and more characters, including the hero’s grandparents, and how they met and fell in love and … I think I skipped the next sixty years/pages because I wanted to get back to the actual plot.
The too-short stories are complete stories but leave me wishing there had been some more subplots, just so the story would last longer. When these stories are part of a series, I’m usually quick to buy or preorder the next book in the series so I can spend more time with characters who feel like they’ve become friends.
A story can be too short, however, and that comes down to reading time. I’m a fast reader, and I prefer stories that take me at least two hours to finish. That means at least 50,000 words … particularly if it’s a story I’ve paid for. I’m more forgiving of free or 99 cent novellas, or novellas that are part of an anthology.
I sometimes see the analogy that we happily pay $5 for a coffee, yet won’t pay $5 for a book. Well, if I can read a $5 book in less time that it takes me to drink the $5 coffee, it’s too short.
My ideal story length is three to five hours of reading time, which is 200-300 pages (about 50,000 words to 100,000 words), although I have read and enjoyed longer stories. And shorter stories.