This is kind of a difficult one for me to answer because my guess is that by “write” I think the questioner meant new words produced.
I don’t go by hours, but by word count. I try to get down 5,000 words per day when I’m drafting (1st draft). It takes me about four hours of intensely focused writing to accomplish this (sometimes longer, sometimes not). My brain’s totally fried after about 5k words, and I can’t write anything coherent afterward. I also consume copious amounts of sugar while I draft. (I don’t need much sugar when I revise though.)
Once I’m done drafting, I generally go back and rework the character arcs, pacing, etc., which takes about one to two weeks, then I send the draft to my editor to look at.
While my editor’s reading my manuscript, I “detox”. That is to say, I get caught up on administrative items, read a few books, watch some TV shows and movies I’ve been meaning to see, try to wind down a bit and think about my next project, etc. This ensures that there’s some emotional distance between me and the story by the time my editor’s comments come back to me…and that, in turn, makes it much easier for me to revise. (My editor’s too honest and ethical to tell me that what I sent her is so brilliant it rivals Shakespeare’s King Lear.)
So as you see, I don’t have a set number of hours a day I write. But having daily milestones and goals help me be productive without burning out (too much). :)