Sorting, Searching, and Counting