On the equivalence of a pair of binary quadratic forms Let $f,g, u,v \in \mathbb{Z}[x,y]$ be binary quadratic forms with co-prime coefficients. We say that the pair $(f,g)$ and $(u,v)$ are $\operatorname{GL}_2(\mathbb{Z})$-equivalent if there exists $T = \left(\begin{smallmatrix} t_1 & t_2 \\ t_3 & t_4 \end{smallmatrix} \right) \in \operatorname{GL}_2(\mathbb{Z})$ such that
$$\displaystyle f(t_1 x + t_2 y, t_3 x + t_4 y) = u(x,y).$$
and
$$\displaystyle g(t_1 x + t_2 y, t_3 x + t_4 y) = v(x,y).$$
Note that if the pair $(f,g)$ is equivalent to $(u,v)$, then $f$ is equivalent to $u$ and $g$ equivalent to $v$ as individual binary quadratic forms, but the converse need not be true, since it is not clear that there exists a common matrix $T$ that sends $f$ to $u$ and $g$ to $v$. 
Aside from the discriminants $\Delta(f), \Delta(g)$ of the individual forms $f$ and $g$, the pair $(f,g)$ has one more invariant which can be taken to be
$$\displaystyle \Delta(f,g) = 2 f_2 g_0 - f_1 g_1 + 2 f_0 g_2,$$
where $f(x,y) = f_2 x^2 + f_1 xy + f_0 y^2$ and $g(x,y) = g_2 x^2 + g_1 xy + g_0 y^2$. 
Denote by $h(d_1, d_2, d_3)$ to be the class number of $\operatorname{GL}_2(\mathbb{Z})$-equivalence classes of pairs of binary quadratic forms $(f,g)$ with $\Delta(f) = d_1, \Delta(g) = d_2$, and $\Delta(f,g) = d_3$. Are there any estimates for $h(d_1, d_2, d_3)$ in terms of $d_1$ and $d_2$, or average estimates with $0 < \max\{|d_1|, |d_2|,|d_3|\} \leq X$?
I have consulted an old paper by Dickson (https://www.jstor.org/stable/2370100?seq=1#page_scan_tab_contents) but he only treated the easier case of $\operatorname{GL}_2(\mathbb{Q})$-equivalence. 
Any help or reference would be appreciated! 
 A: We can show that $ h(1,1,n)  $  increases like  $ n $-th  powers of 2  :  indeed, in the half-plane presentation of the set of positive definite quadratic forms, the euclidean form is identified to  $ i $  and the other unimodular forms are the points of the Serre Tree that stand at the middle of the edges. The trace ( $d_3 $  ) of a form is then the distance between that form and the  Euclidean form on this tree. Say  $ A_n  $  is the set of those forms of trace  $ n $ . The cardinal of  $ A_n $  is  $ 2^n  $  and the cardinal of  $ A_n /\mathrm{SO}_2(\mathbf Z) $  is  something we might call $ sh(1,1,n) $: the number of proper equivalence classes. Thus  $ h(1,1,n )$  is somewhere between $  2^{n-4} $ and  $ 2^n $ . 
In the general case , I guess the behaviour is similar (when defined). At least if  $ d_3 $  measures this kind of distances ... Indeed, in this case,  if  we take two forms  $ A $  and  $ B $  in the usual fundamental domain of the action of $ \mathrm{ Sl}_2(\mathbf Z) $, there is a unique representant of  $ B $ in each tile and  we can count the number of these representants which are at distance n in this tesselation from $  A $ .
Thus probably at  $ d_1 $  and  $ d_2 $  fixed,   $ h(d_1,d_2,d_3) $  grows like  some $ \gamma^n$  , with  $ \gamma \leq 2 $ .
A: The exact class number formula was given by Jorge Morales in the following paper:
Jorge Morales. The classification of pairs of binary quadratic forms. Acta Arith., 59(2):105–121, 1991.
In particular, he showed that 
$$\displaystyle h(d_1, d_2, d_3) = m \sum_{n | 4(d_3^2 - d_1 d_2)} \left(\frac{d_1}{n}\right),$$
where $m = 1$ if $d_3^2 - d_1 d_1 \geq 1$ and $m = 2$ if $d_3^2 - d_1 d_1 < 0$, and $\left(\frac{\cdot}{n}\right)$ is the Jacobi symbol. 
The case when computing the class number $h(d_1, d_2, d_3)$ of pairs $(f,g)$ with $\Delta(f) = d_1, \Delta(g) = d_2, \Delta(f,g) = d_3$ and $f,g$ are both positive definite was resolved by an earlier paper by K. Hardy and K. Williams. 
