Q:

Temperature of a small system

What is wrong if I define temperature of a small system (I mean, a system which has not a large number of particles) by
$$1/T = dS/dE$$
?

A:

Nothing - that is the correct definition.
One little caveat is that small systems are usually in contact with a larger system with a temperature that's more easily controlled or measured (the "heat bath"), and $T$ usually stands for the temperature of the heat bath rather than the small system itself. However, this doesn't make a lot of difference in practice, because the small system will very rapidly attain the same temperature as the heat bath anyway.

