Combining moments of Inertia in gear chain

I've got two objects connected by a rod along it's axis of rotation (e.g. a sphere on top of a flat cylinder rotating around it's symmetric axis).

Assuming the effects of the rod are negligible, is it correct to simply sum the two moments of inertia for both objects together to calculate the total moment of inertia for the entire compound object?

i.e. $$I_{total} = \sum_{1}^{n} I_n$$

So in the case of a cylinder connected to a sphere:

$$I_{total} = \left ( \frac{1}{2}M_{cylinder} R_{cylinder}^2 \right ) + \left ( \frac{2}{5} M_{sphere} R_{sphere}^2\right )$$

Or is that wrong?

That's correct so long as the rotation axis passes through the centers of mass of both objects. In general, the moment of inertia about a fixed axis (the $z$-axis, say) will be something like $$I = \int_\text{object} \rho (x^2 + y^2) \,dV$$ But if we can split this integral up into two disjoint volumes (a cylinder and a sphere, say), we will have $$I = \int_\text{cylinder} \rho (x^2 + y^2) \,dV + \int_\text{sphere} \rho (x^2 + y^2) \,dV = I_\text{cylinder} + I_\text{sphere}$$ as you suspected.