The subtle difference is that 1) this only applies if x is an integer and 2) such a summation assumes that we sum up a known amount of times (i.e. n*x where n is fixed).
If you add up d(x)/dx n times you get n which is what we expect.
The derivative of nx is n and does not depend on x at all.
You can't do what you did because what you are doing (and the way you are doing it) is ill-defined. If you are summing up a fixed amount of times is just (x + x + ... + x) n times and not "x" times (what if x is 1.123123798123978123 or pi)?
You have to be careful with how you specify things.