I am looking to find real quadratic fields whose Hilbert class field is abelian over $\Bbb Q$. Then I learned about genus numbers and genus field of the number field. It is enough to find a number field whose class number is equal to the genus number. In [YOSHIOMI FURUTA article][1]   
I found the formula, but I have a problem with computing the order of the quotient. 
So I was wondering, is there a way to find genus number using Sage just like the class number.

Any help is very appreciated

  [1]: https://projecteuclid.org/download/pdf_1/euclid.nmj/1118802021