The cumulative count of property P for a sequence S_n = {a_1, a_2, ..., a_n} is a sequence of counts of the numbers of elements a_i with i<=k that satisfy P for k = 1, 2, ..., n. For example, given the sequence {1, 2, 3, 3, 2, 3}, the cumulative count of 3s is given by {0, 0, 1, 2, 2, 3}.