Sequential counting with mongodb