How to compute class number of a torus Let $T$ be an algebraic torus over a number field $K$. 
Following notations in Ono's The Arithmetic of Tori, 
http://www.jstor.org/discover/10.2307/1970307?sid=21105671135711&uid=3739888&uid=2&uid=3739256&uid=4
we define 
$T_A$ the adele points, $T_K$ the $K$-rational point of $T$ and 
$$T_{A,S_{\infty}}=\prod_{v \in S_{\infty}}T(K_v)\times \prod_{v \notin S_{\infty}}T_v^c $$
The class number of $T$ is defined as 
$$ h_T := [{T_A}:{T_{A,S_{\infty}}T_K}] $$
My question is how do we compute $h_T$ in pratice. If $T=\mathbb{G}_m$, $h_T$ is just the class number of $K$ and we compute it using Minkowski's bounds. But I don't know how to compute $h_T$ in general. 
For an example, if $T$ is the torus $Spec(\mathbb{Q}[x,y]/(x^2+y^2-1))$, what is $h_T$ ?
Thank you very much.
 A: I don't know how practical this is to compute in general, but Ono had a student, Shyr, who proved an analytic class number formula for $\mathbb Q$-tori in his thesis.  This can at least be used to get an expression for "relative class numbers" (quotients of class numbers).  Ono used this in this paper (and maybe Shyr in his thesis also) to compute the class number of a torus which is the kernel of a norm map of a cyclic extension of Q.
Shyr's formula was later generalized by Rony Bitan (2011, Journal of Number Theory).
A: You can use relationships between different tori. For instance, your torus lives in a long exact sequence
$T\to \operatorname {Res} _{\mathbb Q(i) / \mathbb Q } \mathbb G_m  \to \mathbb G_m $
This gives you a cohomology long exact sequence:
$ H^0( \mathbb Z, \operatorname {Res} _{\mathbb Q(i) / \mathbb Q } \mathbb G_m) \to H^0( \mathbb Z, \mathbb G_m) \to H^1(\mathbb Z, T) \to H^1 ( \mathbb Z,  \operatorname {Res} _{\mathbb Q(i) / \mathbb Q }\mathbb G_m ) \to H^1(\mathbb Z, \mathbb G_m)$
Equivalently:
$ H^0( \mathbb Z[i], \mathbb G_m) \to H^0( \mathbb Z, \mathbb G_m) \to H^1(\mathbb Z, T) \to H^1 ( \mathbb Z[i], \mathbb G_m ) \to H^1(\mathbb Z, \mathbb G_m)$
Evaluating the $H^0$s as unit groups and $H^1$s as class groups:
$ \mu_4 \to \mu_2 \to H^1(\mathbb Z, T) \to 0 \to 1$
The map $\mu_4 \to \mu_2$ is the norm map, which is trivial, hence $H^1(\mathbb Z, T) = \mu_2$, and the class number is $2$.
You can probably do this in general but you need a spectral sequence.
