Around 120k words, in two parts, a finished novel. It took about 8 months on-and-off, but most of it was written in short, intense marathons separated by weeks (or months) of inactivity. I think the actual writing time would amount to two - three weeks total.
I'm not very fond of using pages as the measure of length, it can be very misleading. My 120k words took 210 a4 pages, but my formatting is... Idiosyncratic, to say the least. It could easily be wrapped down to a much shorter length.
As for preferred length, it's a bit hard to say. I used to prefer writing long stories by a mile, but since then I've been stuck with an intense writing block for almost 4 years. Right now, I'm happy if I can write just about anything - short forms, novellas, flash fiction, any self-contained story. My biggest dream is to write the next part of my novel. It's experience like no other, and doing a short form can't really replicate that. Beggars can't be choosers, though.
My experiences with writing long forms are heavily influenced by the constraints and demands of my novel, so I don't believe they'll apply to everyone. The few things that come to my mind:
What helped me the most was setting myself clear goals and objectives in the real world. Writing is a form of communication, so the best first step is to establish what I want to communicate.
What is the message of my story? What do I want to show to my reader? What kind of feelings, thoughts or impressions do I want to evoke? What would I like to give to my audience through my writing? What would I like to get out of writing and sharing it?
I prefer to answer these questions from a get-go, before I even start conceptualising the story itself. It helps me establish what exactly do I want to write, how do I need to write it and what kind of tools (style, narration, plot structure, characters, etc.) I need to accomplish that.
Planning ahead helps, but only if I have a clear image of my story (see above). My favourite method is establishing what Doctor Who would call 'set points in time': A number of specific scenes that have to happen in the story. Everything in-between is the room for improvisation and 'pantsing' - I literally write whatever needs to happen to reach the next set point.
It helps a lot to have a set ending of the story, or at least several alternate endings to pick from. It might be vague, but a clear final scene tends to make truly powerful stories - the entire writing is leading to a single, well-defined moment. If I have a clear idea of the ending, I like to write it before anything else.
I see each chapter as a self-contained short form. It relies on the information and developments from the previous parts, but it should have its own exposition, build-up, climax and resolution. A reader who opens the book on a random page should be able to understand what happened in the chapter (if not how it fits the big picture).
If several chapters are directly linked together, I try to end each of them in a climax that gets resolved in the next chapter, and so on until I reach the resolution of the bigger scene. In this case, of course, the chapters are not self-contained - however, they build a single self-contained part of the plot.
For example, let's imagine that the protagonists are looking for a villain. In the first chapter they're searching for him, introducing the location (exposition), showing the search (build-up) and finally finding him (climax). In the next chapter he flees and they set to pursue him (resolution to previous chapter), then a chase scene unfolds (build-up) until they catch up and confront him (climax). In the next chapter the fight breaks out (resolution), the protagonists and the villain lock in combat (build-up) that ends up with the villain throwing a smoke screen (climax) and escaping. The protagonists lose their chance to catch him (the resolution of the whole longer scene).