I have a number operator $a^\dagger a + b^\dagger b$, where $a^\dagger$ and $b^\dagger$ are fermion operators. If a unitary transformation $U$ is performed, the number operator is written in the new fermion operators $(\tilde{a},\tilde{b})^T = U(a,b)^T$, $\tilde{a}^\dagger \tilde{a} + \tilde{b}^\dagger \tilde{b}$. It says that the number of fermion is identical regardless of the fermion basis related by unitary transformations.
However it is not the case for a Bogoliubov transformation. For example, if we transform the fermion operator in the following way $(\tilde{a}^\dagger, \tilde{b}^\dagger, \tilde{a}, \tilde{b})^T = M (a^\dagger, b^\dagger, a, b)^T$ with $$ M = \frac{1}{2}\begin{bmatrix} 1 & -1 & 1 & 1 \\ 1 & 1 & -1 & 1 \\ 1 & 1 & 1 & -1 \\ -1 & 1 & 1 & 1 \\ \end{bmatrix}. $$
$M$ is a unitary matrix or exactly an orthogonal matrix. $MM^\dagger = I$ ensures the anti-commutation relation. The number operator can be written as $\frac{1}{2}(a^\dagger,b^\dagger,a,b)diag(1,1,-1,-1)(a^\dagger,b^\dagger,a,b)^T+1$ or
$$\frac{1}{2}(a^\dagger,b^\dagger,a,b)M^\dagger Mdiag(1,1,-1,-1)M^\dagger M(a^\dagger,b^\dagger,a,b)^T+1 = \\ \frac{1}{2}(\tilde{a}^\dagger,\tilde{b}^\dagger,\tilde{a},\tilde{b})Mdiag(1,1,-1,-1)M^\dagger(\tilde{a}^\dagger, \tilde{b}^\dagger,\tilde{a},\tilde{b})^T+1.$$
Result of $Mdiag(1,1,-1,-1)M^\dagger$ has off diagonal elements $$ \begin{bmatrix} 0 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ -1 & 0 & 0 & 0 \\ \end{bmatrix}. $$
The number operator after Bogoliubov transformation is not a form of number operator anymore due to the off diagonal elements. That means fermion number is different after the Bogoliubov transformation. It also says that fermionic parity operator $(-1)^N$ is not conserved after Bogoliubov transformation.
It is strange for me. I think that at least the fermionic parity operator should be conserved. So how to understand it physically?