Suppose there is only one criminal, and only the criminal lies.
Suppose A lies, then B says D is a criminal, and there are two criminals, then A is excluded as a criminal.
Suppose C lies, B and D contradict each other, there is a falsehood, and two criminals appear, then C is excluded as a criminal.
Suppose D lies, then it is also false for C to say that B is a criminal. There are two criminals, so D is excluded.
Therefore, only B can be a criminal. Suppose that when B is lying, the other three people are telling the truth.