The Carnot cycle is a reversible cycle, which means that by the end of the cycle the system is in it's initial state, which is characterized by the same entropy value. Therefore we can say that for a reversible cycle the total entropy change is zero.
The Carnot cycle itself is comprised by 4 rev. processes:
- Reversible Isotherm Expansion
- Reversible adiabatic expansion
- Reversible isotherm compression.
- Reversible adiabatic compression.
Let's consider one of these 4 processes i.e Reversible Isotherm Expansion. In this process we have 3 different entities which represent the total system : The hot reservoir, the machine and the cold reservoir.
Because the process is reversible that means that the total entropy change for this simple step should zero. The entities that do take part in this step are the hot reservoir and the machine. Therefore the total entropy should be zero, because the process is reversible.
The hot reservoir loses heat $-Q_H$ and the entropy change of it is $\Delta S_H=\frac{-Q_H}{T_H}$
Now regarding the machine/gas/motor, because we have isotherm expansion $\Delta S_{motor} = nR ln (\frac{V_2}{V_1})>0$.
Does it mean that the total entropy $\Delta S_{total}=\Delta S_{motor} + \Delta S_H=0$