Hi Leo,
It was a great surprise to see Jerry's post dated today (January 24, 2017) as he hasn't posted in this forum for the past 21 months! I suspect the date was changed when you marked the post Helpful today.
Jerry's table does include a column B, as the formula indicates, but that column is hidden.
Here's a solution (very similar to Waynes's) that gives the same results as shown by Jerry, but uses only column A, containing the items and column B. containing the index.
The filter rule is shown to the right of the table:

Checking the "Filter" checkbox in the filter inspector shows only the rows with the first occurrence of each distinct value in column A.

Formula in column B, entered in B2 and filled down to the end of the column:
IF(COUNTIF(A$1:A2,A2)=1,ROW()−1−COUNTIF(B$1:B1,"hide"),"hide")
Plain language translation:
If this is the only occurrence of the value in 'this row' of column A from row 1 to 'this row' of column A,
then
Get the number of 'this row', subtract 1 and subtract the number of occurrences of the word "hide" in cells above 'this row' in column B. Return that number to 'this cell'
else (ie. if there is more than one copy of the value)
Return the text "hide" to 'this cell'.
The number returned will be the number of distinct values in Column A from row 2 to the row containing the number. In this table, the largest number is the largest possible for the set of random two letter values constructed from X or Y in the first position and the letters A, B, C, D, E, F, or G in the second.
Regards,
Barry