I've just edited my post and I saw this in the corner:
I did not receive the rollback badge for this. But how can it display me it will be a rollback, but it won't count for a rollback?
You edited an old revision of the post, you did not actually perform a rollback. As OGHaza astutely points out, the keyword in that message is "effectively".
You get a Clean Up badge when you perform your first rollback, not your first edit that is similar to a rollback.
To rollback (and hence be qualified for the Clean Up badge), you actually need to click the rollback link
To get the rollback link, you need to access the revision history of the post by clicking the "edited X min ago" link to the left of your user card:
But the link won't show up unless the post has more than 1 revision, and you have full edit privileges on the post in question, meaning: