There are various dmenu add-ons that will sort the list by most-frequently-used first: