Finding the order of a subgroup H