Gravity and count probabilities in an expanding universe