Counting sort?(How to implement?)

How should one implement counting sort??
Is it similar to any prev ones?

It’s fairly simple. Just store the count of all elements from 1 to 10^6. Then iterate from 1 to 10^6 , and print the number it’s count number of times.