Number N = A B C D E

A = number of zeros among A, B, C, D, and E. A ≠ 0. So A can be 1, 2, 3 or 4.

B = number of 1s in the number. B can be 0, 1, 2, 3 or 4.

C = number of twos. C can be 0, 1, 2, 3, or 4.

D = number of 3s. D = 0, 1, 2, 3, or 4.

E = number of fours. E = 0, 1, 2, 3 or 4

=====================

A can not be 0, as then there is a zero, and hence A must become 1.

=========================

Now let A = 1. N = 1 B C D E

Then B = 1 as there is a one. But now there are two ones. So B ≠ 1. Let B=2. Among C, D and E, we must have one 0 and one 1. Let E=0. C=1. Then if D is 0, then A will be 2. If D is 1, then B will be 3. We try this logical sequence.

If D or E is not 0, then the digit 3 or 4 must appear some where. Then we must have three 0s, or 1s, or 2s in the number. But then the number becomes some other number.

Or, we must have four 0s, four 1s, or four 2s some where. Again, we see clearly that is not possible.

We don't find a consistent number. Thus, for any choice of C, D and E, we do not find a consistent number.

===========================

Now let A = 2

The arguments expressed above apply. There are two zeros among B,C, D and E. Let E = D = 0. C is 1 as A = 2. Since now there is a 1, B = 1. Now since there are two 1s, B must increase. Then C or D or E must change. Thus the recursive effect of change in one digit impacts other digits.

===============================

let A = 3.

So three of B, C, D, E must be zeros. D has to be 1 as there is a 3. Then the remaining have to be B = C = E = 0. Then B = 1, as D becomes 1. But then there are two 1s now. So B becomes 2. Then C has to become 1. Thus it is not possible to maintain 3 zeros in the number.

=================================

now let A = 4.

That means that there are four zeros. Hence, B = C = D = E = 0. Now since there is no other digit in the number, the number remains as it is and the given rules are valid.

* Hence, there is only one solution, that is 4 0 0 0 0*

=================================

Alternately, we can start selecting the values for E first. We find easily that it has to be a 0 only.

Similarly, we try the values for D. If it is different from 0, then 3 has to appear in the number. Then 0 or 1, or 2 must appear three times. Then the other digits must also appear. That is not possible.

Thus coming to C, with D and E being 0s. We have very few possibilities now. Solve it easily. The answer is only one number 4 0 0 0 0.