ABSTRACT Void number count (VNC) indicates the number of low-density regions in the large-scale structure (LSS) of the Universe, and we propose to use it as an effective cosmological probe. By generating the galaxy mock catalogue based on Jiutian simulations and considering the spectroscopic survey strategy and instrumental design of the China Space Station Telescope (CSST), which can reach a magnitude limit $\sim$23 AB mag and spectral resolution $R\gtrsim 200$ with a sky coverage of 17 500 deg2, we identify voids using the watershed algorithm without any assumption of void shape and obtain the mock void catalogue and data of the VNC in six redshift bins from $z=0.3$ to 1.3. We use the Markov chain Monte Carlo method to constrain the cosmological and VNC parameters. The void linear underdensity threshold $\delta _{\rm v}$ in the theoretical model is set to be a free parameter at a given redshift to fit the VNC data and explore their redshift evolution. We find that the VNC can correctly derive the cosmological information, and the constraint strength on the cosmological parameters is comparable to that from the void size function method, which can reach a few per cent level in the CSST full spectroscopic survey. This is because, since the VNC is not sensitive to void shape, the modified theoretical model can match the data better by integrating over void features, and more voids could be included in the VNC analysis by applying simpler selection criteria, which will improve the statistical significance. It indicates that the VNC can be an effective cosmological probe for exploring the LSS.