Could we use Magma to calculate subgroups of a fixed order? I know very little about the software Magma and I know it can be used in group theory. Here I have a problem, could someone tell me whether and how to calculate it using Magma?  
Here is the problem: given a fixed group $G$, I want to know the number of its subgroups of fixed order. For example, Let $G$ be a Coxeter group of $B_3$, it has generators $s_1,s_2,s_3$ with relations $s_1^2=s_2^2=s_3^2=(s_1s_2)^4=(s_1s_3)^2=(s_2s_3)^3=1$. The order of $G$ is 48. I want to know whether could we use Magma to calculate the number of subgroups of order 8, 16? 
 A: Yes you can do this, following the documentation in the magma handbook we can do https://magma.maths.usyd.edu.au/magma/handbook/text/841
>  G<s1,s2,s3> := Group< s1, s2, s3 | s1^2, s2^2, s3^2, (s1*s2)^4, (s1 * s3)^2, (s2*s3)^3>;
> Order(G);
48
> LowIndexSubgroups(G, <48 div 8, 48 div 8>);
[
Finitely presented group on 2 generators
Index in group G is 6 = 2 * 3
Generators as words in group G
$.1 = s2 * s1
$.2 = s3 * s2 * s1 * s2 * s3 * s1,

Finitely presented group on 3 generators
Index in group G is 6 = 2 * 3
Generators as words in group G
$.1 = s2
$.2 = s1 * s2 * s1
$.3 = s3 * s2 * s1 * s2 * s3 * s1,

Finitely presented group on 2 generators
Index in group G is 6 = 2 * 3
Generators as words in group G
$.1 = s1
$.2 = s3 * s2 * s1 * s2,

Finitely presented group on 3 generators
Index in group G is 6 = 2 * 3
Generators as words in group G
$.1 = s1
$.2 = s2 * s1 * s2
$.3 = s3 * s2 * s1 * s2 * s3 * s2,

Finitely presented group on 3 generators
Index in group G is 6 = 2 * 3
Generators as words in group G
$.1 = s1
$.2 = s2 * s1 * s2
$.3 = s3 * s2 * s1 * s2 * s3,

Finitely presented group on 3 generators
Index in group G is 6 = 2 * 3
Generators as words in group G
$.1 = s1
$.2 = s3
$.3 = s2 * s1 * s2 * s3 * s2 * s1 * s2,

Finitely presented group on 2 generators
Index in group G is 6 = 2 * 3
Generators as words in group G
$.1 = s1
$.2 = s2
]
true
> 
> LowIndexSubgroups(G, <48 div 16, 48 div 16>);
[
Finitely presented group on 3 generators
Index in group G is 3
Generators as words in group G
$.1 = s1
$.2 = s2
$.3 = s3 * s2 * s1 * s2 * s3
]
true

This lists distinct conjugacy classes of subgroups and gives us generators in terms of the original ones $s_1,s_2,s_3$. If we just want the number of classes put a # in front:
> #LowIndexSubgroups(G, <48 div 16, 48 div 16>);
1
> #LowIndexSubgroups(G, <48 div 8, 48 div 8>);  
7

To get the actual number of subgroups, see Derek Holt's comment above.
A: Here is an alternative to Alex's answer:
G<s1,s2,s3> := Group< s1, s2, s3 | s1^2, s2^2, s3^2, (s1*s2)^4, (s1 * s3)^2, (s2*s3)^3>;

f,GG:=CosetAction(G,sub<G|>);

Subgroups(GG:OrderEqual:=16);

Subgroups(GG:OrderEqual:=8);

The first line is the same, to define the group. The second turns the group into a permutation group GG (acting regularly on itself) with f the isomorphism from G to GG. Then it's self-explanatory. The advantage is that there are many more algorithms available for permutation groups than for finitely presented groups, and they are often faster. (Note that there are other, sometimes better way to turn a group into a permutation group, but this way always works, if magma can figure out the group is finite.)
You can use f to go from G to GG and back. For example, if you add at the end:
(Subgroups(GG:OrderEqual:=16)[1]`subgroup)@@f;

It will output:
Finitely presented group on 5 generators
Generators as words in group G
$.1 = s1
$.2 = s2
$.3 = Id(G)
$.4 = (s1 * s2)^2
$.5 = s1 * s3 * s2 * s1 * s2 * s3

