"Wavelet Trees for All" by Navarro is an amazingly good overview of the uses of rank/select.