Example 2 The number of prime pairs \((a, b)\) that satisfy the equation
$$
a^{b} b^{a}=(2 a+b+1)(2 b+a+1)
$$
is \qquad (2]
(2011, I Love Mathematics Junior High School Summer Camp Mathematics Competition)
【Analysis】If $a$ and $b$ are both odd, then
the left side of equation (1) $\equiv 1 \times 1 \equiv 1(\bmod 2)$,
the right side of equation (1) $\equiv(2 \times 1+1+1)(2 \times 1+1+1)$ $\equiv 0(\bmod 2)$.
Clearly, the left side is not congruent to the right side $(\bmod 2)$, a contradiction.
Therefore, at least one of $a$ and $b$ must be even.
Since $a$ and $b$ are both prime numbers, by symmetry, we can assume $a=2$ first.
Then $2^{b} b^{2}=(b+5)(2 b+3)$.
Clearly, $b \neq 2$, so $b \geqslant 3$.
If $b>3$, then $b \geqslant 5$. Thus,
$$
2^{b} b^{2} \geqslant 2^{5} b^{2}=4 b \times 8 b>(b+5)(2 b+3) \text {. }
$$

This contradicts equation (2).
When $b=3$, equation (2) holds.
Therefore, $a=2, b=3$.
By symmetry, $a=3, b=2$ also satisfies the condition.
In summary, the number of prime pairs is 2.