For reference, the paper in question is
http://arxiv.org/abs/1412.5606. Eq. (2.28) is a computation done for a graviton, not a ##SO(2)## gauge field.
To understand the computation, you need to understand the discussion starting prior to equation (2.2). The authors want to compute a particular entanglement entropy using the partition function for free-field theories on Euclidean spacetimes of the form ##M= \mathbb{C}/\mathbb{Z}_N\times \mathbb{R}^{D-2}##. The coordinates are ##(x_0,x_1,x_2,\ldots, x_{D-1})##, where ##(x_0,x_1)## refer to ##\mathbb{C}## and ##(x_2,\ldots, x_{D-1})## to ##\mathbb{R}^{D-2}##. The orbifold group ##\mathbb{Z}_N## is a subgroup of the ##SO(2)\subset SO(D)## rotations that act only on ##(x_0,x_1)##.
The ##D##-dimensional ##U(1)## gauge field is in the spin 1 representation of ##SO(D)##. In the paper, the components of the gauge field ##A_a## are numbered from ##1## to ##D## rather than from ##0## to ##D-1##. The ##SO(2)## subgroup acts on the ##A_1## and ##A_2## components, but not on ##A_3,\ldots A_D##. Hence, we determine that ##A_1## has ##SO(2)## spin ##s_1=1##, ##A_2## has ##s_2=-1##, while ##A_3,\ldots A_D## have ##s_a =0##.
The graviton has components ##g_{ab}## (we'll use the Latin indices to match the index chosen on ##s_a##) and is in the spin 2 representation of ##SO(D)##. The ##SO(2)## subgroup acts as follows:
$$ \begin{split}
& g_{11}~~~ \text{with} ~~~ s=2,~~~1~\text{component}, \\
& g_{22}~~~ \text{with} ~~~ s=-2,~~~1~\text{component}, \\
& g_{1a} = g_{a1}, a\neq 1,2~~~ \text{with} ~~~ s=1,~~~D-2~\text{components}, \\
& g_{2a} = g_{a2}, a\neq 1,2~~~ \text{with} ~~~ s=-1,~~~D-2~\text{components}, \\
& g_{ab} , a,b\neq 1,2~~~ \text{with} ~~~ s=0,~~~\frac{D(D-3)}{2}~\text{components}.
\end{split}$$
Note, there is a typo in the last line of (2.28), so I should do the counting explicitly. Since the graviton is a symmetric, traceless tensor, the number of components of ##g_{ab}## with ##a,b\neq 1,2## is
$$ \frac{(D-2)^2 - (D-2)}{2} + (D-2) -1 = \frac{D(D-3)}{2}.$$
The calculation is as follows: the first term counts the number of independent off-diagonal elements, the second is the diagonal elements and the last removes the trace. You should also verify that the above counting gives the RHS of (2.29) correctly.