All counts of 4 as in Number 4 or all entries at array position 4?
array = [1,1,2,2,2,3,3,6,6,6,6,7,7,7,9] has 15 elements
if you remove all counts that are array position 4 will eventually return an array of
array = [1,1,2,2]
You say you want :
which is not array position 4 but 7,8,9,10 of the array that has been removed in your example.
If you want to remove an element from an array, you use splice() to remove the element.
So it is best to clarify what you are tying to achieve, remove array element 4 or remove elements that have 4 entries the same ...