Stochastic orderings on partial sums of random variables and on counting measures of random intervals