An algorithm to accomplish this:
Each filter in your Favorites has a statistic “S” (in the same hidden file where the Favorites list is kept for the user), a floating-point number.
When a new filter is added to the Favorites,
Each time you use a filter from the Favorites list,
- That filter has new S set to (1 + S)/2
- All other Favorites filters have new S set to S*K
where K is a number less than 1, (probably 99/100)
Favorites are listed in S order, highest to lowest.
This way, no large list of usage statistics is needed.
The most-used filters keep trending towards the “first on the list” value of 1, while the unused filters trend towards 0.
The limiting value is the floating minimum, harmless, rather than the undesirable “it keeps getting bigger” which can lead to overflow.
If this algorithm proves to be too volatile, change the new S equation to (1+S(C-1))/C where C is a small integer constant.
(The first equation for S, above, is the case where C=2.)