Find Nth Most Rare Element In A List Java