Step 1: Assume A is a guard and test it.
If A is a guard, A's statement is true, so B is a guard.
If B is a guard, B's statement is true, so C is a thief.
If C is a thief, C's statement is false, so D is not a thief, meaning D is a guard.
If D is a guard, D's statement is true, so B and E are different kinds. Since B is a guard, E must be a thief.
If E is a thief, E's statement is false, so A is not a guard. This contradicts the starting assumption that A is a guard, so this branch fails.
Step 2: So A must be a thief, and we work forward again.
A is a thief, so A's statement is false: B is not a guard, meaning B is a thief.
B is a thief, so B's statement is false: C is not a thief, meaning C is a guard.
C is a guard, so C's statement is true: D is a thief.
D is a thief, so D's statement is false: B and E are NOT different kinds, meaning they are the same kind. Since B is a thief, E is also a thief.
E is a thief, so E's statement is false: A is not a guard, which matches A being a thief. Every statement is now consistent with no contradiction.
Step 3: Count the thieves.
A = thief, B = thief, C = guard, D = thief, E = thief. That is four thieves (A, B, D, E) and one guard (C).
Step 4: Final Answer.
The number of thieves is 4.\[ \boxed{4} \]