How to derive the total number of molecular orbitals based on the given number of atomic orbitals?
The question itself deals with molecular orbital theory and by extension with the approximation of combining atomic orbitals to form these molecular orbitals; in quantum chemistry this approach is called LCAO (Linear combination of atomic orbitals).

Let us look at one of the simple cases, the dihydrogen molecule. You have one 1s orbital at the first hydrogen, i.e. $\chi_A$, and one 1s orbital at the second hydrogen, i.e. $\chi_B$. You can now combine these orbitals to form a bonding $\eqref{eq:bonding}$ and an antibonding $\eqref{eq:antibonding}$ combination to create the molecular orbitals $\phi_{A+B}$ and $\phi_{A-B}$.
\begin{align}
\phi_{A+B} \equiv 1\sigma_\mathrm{g} &amp;= \chi_A + \chi_B 
  \tag1\label{eq:bonding}\\
\phi_{A-B} \equiv 1\sigma_\mathrm{u} &amp;= \chi_A - \chi_B 
  \tag2\label{eq:antibonding}
\end{align}
A scheme of this can be found on Wikipedia created by the user CCoil.


This does in principle mean that for every bonding configuration of a molecular orbital you will always have an antibonding configuration. In other words the number of atomic orbitals is the same as the number of molecular orbitals.

In your case, when there are four orbitals on one atom and four orbitals on the other atom, you will end up with eight molecular orbitals. A quite complicated case of bonding that shows this is the $\ce{C2}$ molecule, which has previously been discussed here: Bonding in diatomic C2, a carbon-carbon quadruple bond?