Here is the pseudocode from Cormen, Leiserson, Rivest, and Stein:
Counting-Sort(A, B, k)
Note that the C array is shown twice at left, to make it easier to see how the cumulative values are calculated.