"katycorp" wrote:
... to keep track of the search history since the app is specialized enough that using the global search history doesn't make sense. Since I can only show about 9 items, I'd like to order them by the number of times they were searched for.
I think you will do better if instead of keeping number of times something was searched by and sorting history in descending order by that - instead of that, each when an item is searched, put it on top of the list (i.e. do "most recently used" order instead of "most used" order). This won't require sorting and is what traditionally is done in many applications. Sorting by # has the disadvantage of not adapting in time, that is if you searched 10 times for "hero" a year ago, it won't matter you just searched for "vacation" last three times - "hero" be on top of the list