The number of classes in the genus of a quadratic form and algebraic groups