Let the first term of the A.P. be \( a \) and the common difference be \( d \).
- The total number of terms is even, so let the total number of terms be \( 2n \).
- The sum of odd terms is given as 24 and the sum of even terms is given as 30.
- The last term exceeds the first term by \( \frac{21}{2} \), so we have the equation for the \( 2n \)-th term:
\[
a + (2n - 1) d = a + \frac{21}{2}
\]
Simplifying, we get:
\[
(2n - 1) d = \frac{21}{2}
\]
Thus,
\[
d = \frac{21}{2(2n - 1)}
\]
Now, using the sum formula for an arithmetic progression:
- The sum of the first \( n \) odd terms is given by \( S_{\text{odd}} = \frac{n}{2} \left( 2a + (2n - 1)d \right) = 24 \).
- The sum of the first \( n \) even terms is given by \( S_{\text{even}} = \frac{n}{2} \left( 2a + 2nd \right) = 30 \).
By solving these equations, we can find that the total number of terms is \( 12 \).