The specific names used are interchangeable, so yes, "Index" is like "Count" and "Query" is like "ItemToFind".
What do you have trouble with? The pseudocode syntax? Or how to translate an abstract solution into an algorithm? To write one from scratch, think about how you'd carry it out by hand...