Counting the number of independent elements in 2 complex matrices with constraints Given $n\times n$ square matrices $A,B$ which can, in general, have complex entries. They satisfy the following constraints
$$[A,B]=0\quad\quad AA^\dagger-BB^\dagger=I$$
How do we give a counting argument to determine the number of independent components in $A,B$? 
I think the solution should be similar to the counting argument used in determining the number of independent components in $SU(n)$ matrices.  
 A: $A^*$ denotes the transconjugate of $A$. I think that the question is difficult. 
Note that $X_n=M_n(\mathbb{C})^2$ is a real algebraic set of dimension $4n^2$. We seek the dimension of the real algebraic set $Y_n=\{(A,B)\in X_n;AB=BA,AA^*-BB^*=I\}$.
Assume that we randomly choose $A\in M_n(\mathbb{C})=\mathbb{R}^{2n^2}$ s.t. $AA^*-I> 0$. By Cholesky applied to $AA^*-I$, $AA^*-I=LL^*=BB^*$ and $B=LU$ where $U\in U(n)$. Generically, $AB=BA$ iff $B$ is a polynomial in $A$; in general, there are no $U$ s.t. $LU$ is a polynomial in $A$. 
EDIT. $\textbf{Proposition 1}$. One has $dim(Y_2)\geq 8$.
$\textbf{Proof}$. Let $A$ be a normal matrix. Then, up to a $U(2)$ change of basis, $A=diag(a+ib,c+id)$ where $a,b,c,d$ are real.
Case 1. $A=uI_2$, a scalar matrix with $u\in \mathbb{C},|u|>1$; it remains the relation $BB^*=(|u|^2-1)I_2$. Then $B=\sqrt{|u|^2-1}L$ where $L\in U(2)$. The number of real parameters $(u,L)$ is $2+4=6$.
Case 2. $A$ has distinct eigenvalues with 
$a^2+b^2> 1,c^2+d^2> 1$.
Then $B=diag(e+if,g+ih)$ with the $2$ algebraically independent conditions 
$a^2+b^2-e^2-f^2=1,c^2+d^2-g^2-h^2=1$.
$(1)$ Then the number of parameters is $8-2=6$.
Now, we consider the orbit of such a couple of diagonal matrices $(A,B)$ under the action of $U(2)$. $V\in U(2)$ is in the stabilizer of $(A,B)$ iff it commutes with $A$, that is, $V$ is diagonal and, consequently, in the form $V=diag(e^{i\alpha},e^{i\beta})$ where $\alpha,\beta\in\mathbb{R}$. $(2)$ Then the orbit has dimension $4-2=2$.
$(3)$ Finally the dimension of such connected component is $6+2=8$. $\square$
In the same way, we can prove this generalization.
$\textbf{Proposition 2}$. One has $dim(Y_n)\geq n^2+2n$.
$\textbf{Proof}$. For $(1)$, we obtain $2n+2n-n=3n$.
For $(2)$, the orbit has dimension $n^2-n$.
For $(3)$, the total dimension is $3n+n^2-n=n^2+2n$.  $\square$
