Which filter should I use? Just want to keep high count values
If I understand your requirements, you are correct that a median filter won't fulfil them.

Consider the following sequence of values (sorted as per the median filter algorithm with a window of length 9.

(1 2 3 4 5 6 6 6 9)


The median value is 5 but the highest frequency value (statistically) is 6.

Now if you did a population count

Bin    0 1 2 3 4 5 6 7 8 9
Count  - 1 1 1 1 1 3 - - 1


you can identify the highest frequency value as 6. I don't know if this approach has a formal name, but "mode filter" seems to describe it well, by analogy with "median filter".

This could get computationally expensive. 

However if you used a sliding window (say, length 9) then as each new value enters the window, you increment its count, and as it leaves the window you decrement its count, then maintaining the population counts is cheap. In other words, before calculating sample N, you add sample (N+4) and remove sample (N-4) from the popcount bins. 

Then you loop over the bins to find the bin with the maximum count.

How you resolve cases where two or more bins have the same max count, e.g. in the sequence 

(1 2 3 3 5 6 6 8 9)


giving counts

Bin    0 1 2 3 4 5 6 7 8 9
Count  - 1 1 2 - 1 2 - 1 1


where you could take the answer as either 3 or 6 ... that's up to you.