Abstract. We study a class of square functions in a general framework with applications to a variety of situations: samples along subsequences, averages of Z d + actions and of positive L 1 contractions. We also study the relationship between a counting function first introduced by Jamison, Orey and Pruitt, in a variety of situations, and the corresponding ergodic averages. We show that the maximal counting function is not dominated by the square functions.