Directly: you can't, BM has no priority sort with counting support.
Indirectly: Make an own compare function and use TList.
In the compare function, you cast the 2 objects to your own "container" class for the unique words. That container class has a field "count:int"
Whenever you find containerClass(a) == containerClass(b) (or how you call the 2 :object instances in the compare function), you raise the count of a and return 0.
when they are not equal, you return containerClass(a).count - containerClass(b).count
Indirectly: Make an own compare function and use TList.
In the compare function, you cast the 2 objects to your own "container" class for the unique words. That container class has a field "count:int"
Whenever you find containerClass(a) == containerClass(b) (or how you call the 2 :object instances in the compare function), you raise the count of a and return 0.
when they are not equal, you return containerClass(a).count - containerClass(b).count