Step 1: Analyze set \( A = \left\{ x \in (0, \pi) \mid - \log\left(\frac{2}{\pi}\right)\sin x + \log\left(\frac{2}{\pi}\right)\cos x = 2 \right\} \).
Rewrite the equation by factoring:
\[
\log\left(\frac{2}{\pi}\right) (-\sin x + \cos x) = 2
\]
Since \( \log\left(\frac{2}{\pi}\right) < 0 \), divide both sides:
\[
-\sin x + \cos x = \frac{2}{\log\left(\frac{2}{\pi}\right)}
\]
The right side is negative and outside the range \([- \sqrt{2}, \sqrt{2}]\) for \( -\sin x + \cos x \), therefore no solution for \( x \in (0, \pi) \).
Thus, \( n(A) = 0 \).
Step 2: Analyze set \( B = \left\{ x \geq 0 : \sqrt{x}\sqrt{x - 4} - 3\sqrt{x - 2} + 6 = 0 \right\} \).
The expression's domain requires \( x \geq 4 \) (for \( \sqrt{x - 4} \) real). Set \( t = \sqrt{x - 2} \geq \sqrt{2} \), then rewrite:
\[
\sqrt{t^2 + 2} \sqrt{t^2 - 2} - 3t + 6 = 0
\]
This simplifies to:
\[
\sqrt{t^4 - 4} = 3t - 6
\]
Square both sides:
\[
t^4 - 4 = 9t^2 - 36t + 36
\]
Rearranged:
\[
t^4 - 9t^2 + 36t - 40 = 0
\]
This quartic has two real positive roots in the allowed domain.
Each root \( t \) corresponds to \( x = t^2 + 2 \).
Upon solving, there are four distinct solutions for \( x \) in \( B \).
Step 3: Find \( n(A \cup B) \).
Since \( n(A) = 0 \) and \( n(B) = 4 \), the union has:
\[
n(A \cup B) = 0 + 4 = \boxed{4}
\]