Hierarhical Multi-index counts in Pandas,df.reset_index().groupby('X')['Y'].nunique()