Let $\boldsymbol{A}$ and $\boldsymbol{B}$ be $n \times n$ singular matrices with the same eigenvalues (including multiplicity). Consider that the multiplicity of the eigenvalue $\lambda = 0$ of $\boldsymbol{A}$ and $\boldsymbol{B}$ is $r$, with $0 < r < n$. The QZ decomposition (generalized Schur decomposition) results in
$\begin{align*} &\boldsymbol{A} = \boldsymbol{Q} \boldsymbol{S} \boldsymbol{Z}^T\\ &\boldsymbol{B} = \boldsymbol{Q} \boldsymbol{T} \boldsymbol{Z}^T, \end{align*}$
where $\boldsymbol{Q}$ and $\boldsymbol{Z}$ are unitary matrices and $\boldsymbol{S}$ and $\boldsymbol{T}$ are upper triangular.
I'm particulary interested on what can be said on the multiplicity of the eigenvalue $\lambda = 0$ for $\boldsymbol{S}$ and $\boldsymbol{T}$. In this case does the multiplicity of this eigenvalue remain equal to that of $\boldsymbol{A}$ and $\boldsymbol{B}$? Or if not, is it possible to bound the multiplicity of this eigenvalue in relation to $r$, in any other way?
Thank you.