Sorting in linear time

Can the pointer technique be used for sorting if there are more numbers in an array like 0,1,2,3,4,5… . If yes then for how many distinct numbers this technique would be good enough since the conditions would keep on increasing if there are more distinct numbers ?

No when there are many numbers, this technique is not suitable as it will be very complicated.
Here you were having 3 numbers, so 3 windows were formed(each for 0,1and 2). If there are many numbers, then you would have to maintain a lot of windows.
So this approach is suitable only when there are 3 numbers.

So what other sorting approach can we apply for sorting array filled with small distinct numbers like if there are 5 or 6 distinct numbers present apart from using counters ?

In that case, counting sort would be the best approach. That will also be O(n)