Well, if you want to find the acceleration of the center of mass of the whole system, then you need to consider the whole system as one body. Hence, the tension forces between the masses and the pulley will be considered as internal forces.
However, the tension force holding the pulley to the ceiling is an external force as it is applied by a body that is not part of the system. Therefore, you need to consider it when evaluating $F_{\text{net}}$, as Dale said.
We know that there is no acceleration (it's acceptable to use intuition to make this kind of assumption in cases like this) so we find that the upwards tension force is equal and opposite to the force due to gravity. Alternatively, if you know the tension force you can add it to the gravitational force and find that $F_{net}=a=0$.