I need a formula for the 2-adic valuation of the number of proper equivalence classes of primitive positive definite binary quadratic forms of discriminant $-D$, call it $h_0(-D)$. I'm sure the answer is well-known, and in fact I have found it on slides for a talk somewhere (see here, slide 21). According to this, the class number $h_0(-D)$ is precisely divisible by $2^{\mu-1}$ where $\mu$ can be given explicitly in terms of the number of odd prime divisors of $D$, depending on the congruence class of $-D\pmod{32}$. Does anyone have a reference for this which one could cite (the slides are not really such a reference I'd say)? The textbooks I know which address this subject only treat the case where $-D$ is a fundamental discriminant, and I think it requires a bit of work to arrive at the general case. So a reference would be much appreciated.
Thanks a lot in advance!