My experience and the collected anecdotal wisdom of all writing coaches whose books I have read is that it takes you some time to get into the flow (so there is a minimum time you must write each session), you get easier into the writing if you write each day, and – this is your question – that the quality of your writing will deteriorate after some time (so there is a maximum you should not exceed in a writing session).
Taken together, the common recommendation is to:
- write every day
- do some warm up writing of 15 to 30 minutes or use them to polish last day's work
- stop writing before you are out of ideas and before the writing no longer flows smoothly
How long your maximum quality writing time is, you'll have to find out. For a majority of professional writers it seems to be four or five hours at the most.
There are professionals who report that they set themselves word or page limits they must meet every day, but the common recommendation is not by word or page count but by observing your personal creative time limit. Probably you will find that you write about the same number of words in the same time span, but there might be days when some thinking, planning, research or rewriting is called for, and trying to meet your word count will only leave you frustrated. Time can be well spent without a single word written, while writing words that you need to rewrite the next day because they are so bad is counterproductive. From the examples I remember, those that set themselves page count minimums are all older, experienced writers who are long past having to think about the right word or plot problems. There are also a few among these who, I think, don't actually write very well. I don't think it is a good approach for a beginner.