Reducing number fluctuations of ultracold atomic gases via dispersive interrogation