Let $$D_8=\langle \sigma,\rho \; | \; \rho^8=\sigma^2=e \text{ and } \sigma\rho\sigma=\rho^{-1} \rangle $$ be the dihedral group of 16 elements. First of all I found the number of elements of order 2 in $D_8$: 9, they are $\sigma\rho^i$ and $\rho^4$, for $i=0,1,2,...,7$. I also found out that $\rho^4$ commutes with all elements of order 2, $\sigma\rho^i$ commutes with $\rho^4$ and $\sigma\rho^j$ if and only if $i-j \equiv 0 \pmod{4}$.
Here is the problem, I tried to count the subgroups in this way: choose one $\sigma\rho^i$ (8 choices) then choose one element of order two such that they commute (2 choices). So the number of subgroups is $\frac{8\times2}{3\times2}$, this does not seem correct.
Could somebody help me?
(For convenience, let me call $r:=\rho$ and $s:=\sigma$)
We have to find the closed subsets $K:=\{1,a,b,c\}\subseteq D_8$ such that $a^2=b^2=c^2=1$. Order $2$ elements in $D_8$ are $r^4$ and all the reflections $r^js$; $K$ can't be made of reflections only, as the product of two distinct reflections is a rotation ($(r^is)(r^js)=r^issr^{-j}=r^{i-j}$): then, $r^4$ must be in $K$. Therefore, $K$ is of the form $K=\{1,r^4,r^is,r^js\}$, for some distinct $0\le i,j\le 7$. All the closure requirements are fulfilled if and only if $|i-j|=4$, so the sought subgroups are four, namely:
$K_1=\{1,r^4,s,r^4s\}$
$K_2=\{1,r^4,rs,r^5s\}$
$K_3=\{1,r^4,r^2s,r^6s\}$
$K_4=\{1,r^4,r^3s,r^7s\}$