Consider proper equivalence classes of forms with discriminant d equal to the field discriminant, then they can be subdivided equally into genera of forms which form a subgroup of the proper equivalence class group under composition (Cohn 1980, p. 224), where r is the number of distinct prime divisors of d. This theorem was proved by Gauss in 1801.
Arno, S.; Robinson, M. L.; and Wheeler, F. S. "Imaginary Quadratic Fields with Small Odd Class Number." http://www.math.uiuc.edu/Algebraic-Number-Theory/0009/.
Cohn, H. Advanced Number Theory. New York: Dover, 1980.
Gauss, C. F. Disquisitiones Arithmeticae. New Haven, CT: Yale University Press, 1966.