A cavity with nonlinear Kerr-medium is a fundamental component of quantum optics. This paper concerns the effect of nonlinear medium on the behavior of a Kerr-cavity. In order to reveal this effect, the cavity is driven by fields in either vacuum or single-photon states, and the scattered field is monitored by a homodyne or photon-counting detector. Then, the quantum-filtering equation for the number operator is derived in both the Heisenberg and Schrödinger pictures considering measurements. The number of photons in the Kerr-cavity is estimated through the derived stochastic master equations in different situations of initial condition and input fields by considering different dimensions for the related Hilbert space. Afterward, the nonlinearity impact on both the number of photons in the cavity and the annihilation operator dynamic is investigated. In addition, the effect of truncating the corresponding Hilbert space dimension is investigated. In each case, the results are compared with a linear cavity.