We see a lot of shortening services around and there are many free tools that will help you create one on your domain.
The logic is simple, there is a database, there is a long url and an associated short url. When someone access the short url, the long url is fetched from the database and the user is redirected.
Your short urls for all your WordPress post will be in the following format:
To find the POST_ID of a post, just go to your Posts > Edit Page in WordPress Admin and hover over the title of the post and check the link on the status bar. The last number that you see is the POST_ID of the corresponding post. See the image:
Now with this knowledge you could create your own Retweet Button’s and use the link in Twitter 🙂