Is it worth writing and publishing a survey paper while a PhD student There are opportunity costs associated with spending time on writing a critical analysis of the literature and submitting that review article to a journal as opposed to conducting research (although the two aren't mutually exclusive). As a PhD student, is it worth spending the time to write and publish a review article as opposed to just pursuing research, without impacting the graduation timeline? And if the review article is published, would it be reasonable to incorporate it in one's dissertation?
This question is of particular interest to me since I also work a full-time job and only have enough time to allocate to one, maybe two, major projects for school at a given time.
This question has been significantly revised. The old version of the question is below.

My PhD program (United States, Computer Science) recently changed the comprehensive exam requirements so that we now have to write a research survey critically analyzing an area of our choice and orally defend it. The expectation is that the survey, either as is or with some additional work, would be of publishable quality, although there is no requirement for it to be submitted or published. My advisor is encouraging me to strive for actually submitting the survey once completed.
For those familiar with the either formal or informal requirement to publish a certain number of papers in order to graduate, how would publishing a survey impact that paper count? Should or would surveys be considered to count towards the paper count requirement? Additionally, there are opportunity costs associated with writing and trying to publish a survey, such as not being able to dedicate as much time to research; however, writing the survey will certainly help with research.
I understand there are many factors in play with respect to the type of program, quality of the survey, committee members, advisor, etc., but high level considerations would be appreciated.
A survey almost certainly would count towards your paper count requirement.
A proof based on common sense is that surveys can generally be hard to distinguish from research papers: there exist review papers that have notable amount of novel work added but are still called reviews. Thus it is very unlikely for your department to put such a distinction.
Publishing your (already finished) survey is worth it.
Your original question states that you have to produce a survey of defendable quality. Then, the effort required is just polishing the survey further to publishable quality and handling the communication with a journal. The reward will be getting a publication, with all its formal (increasing your paper count, see previous paragraph) and informal (getting recognised) positive consequences. Surely worth it!
The proof is again based on common sense: if the pros did not outweigh the effort in your local environment, no work would have made its way further than internal discussions within your department.