Some experimentation leads me to suspect that if $G$ is a finite group with $|G|=512$ then the number of subgroups of $G$ is congruent to $2$ modulo $4$. Does anyone see a good reason why this might be true? Is there a more general fact of which this is a special case?
For comparison, if $|G|$ is a power of $4$ then the number of subgroups is congruent to $1$ mod $2$.