If $n$ is the number of solutions of the equation $2 \cos x \left(4 \sin \frac { \pi } { 4 } + x \sin \frac { \pi } { 4 } - x\right) - 1 = 1 , x \in [0 , \pi]$ and $S$ is the sum of all these solutions, then the ordered pair $(n , S)$ is :
(1) $\left(2 , \frac { 8 \pi } { 9 }\right)$
(2) $\left(3 , \frac { 13 \pi } { 9 }\right)$
(3) $\left(2 , \frac { 2 \pi } { 3 }\right)$
(4) $\left(3 , \frac { 5 \pi } { 3 }\right)$