It’s possible to identify the rarest sounds, but I think it may not be possible to rank consonent frequencies across languages.
There would be too many arbitrary decisions regarding how to count consonents; how similar do they need to be to count as the same thing? What if in one language a consonant has a degree of flexibility about its pronunciation but in another that same set of sounds are considered separate?