'Return the index of subgroup ``H`` in group ``self``.
Examples
>>> from sympy.combinatorics.free_groups import free_group
>>> from sympy.combinatorics.fp_groups import FpGroup
>>> F, x, y = free_group("x, y")
>>> f = FpGroup(F, [x**5, y**4, y*x*y**3*x**3])
>>> f.index([x])
4'

def index(self, H, strategy='relator_based'):

    if (H == []):
        return self.order()
    else:
        C = self.coset_enumeration(H, strategy)
        return len(C.table)
