Percentile aggregation with min, max, and count

I am looking for the best way to do an aggregation on price, that I can use to present price filters on a a page with the search results.

I will not know beforehand any good ranges to have predefined, as we have a wide variety of items that could be contained within the search results.

What is the best way to set up an aggregation (thinking right now that this would be some kind of percentile aggregation) that can:

Calculate evenly distributed ranges that split up the search results (in 4 or 5 non-overlapping price categories, from lowest price range to highest price range) and shows the min price for that range, the max price for that range, and the resulting count of items in the range?

Any help as to how to do this would be appreciated!

Thanks,

Jim