An analysis is presented of the time evolution of an optical field during a quantum nondemolition measurement of photon number using the cross-Kerr interaction between the signal and probe fields. It is shown that the signal field state collapses into a Fock state only asymptotically (in the infinite time limit), remaining in a superposition of two Fock states (Fock-state qubit) throughout most of the measurement period. Estimates are obtained both for the time required to measure photon number to the desired accuracy and for the Fock-state qubit lifetime.