http://cdn.api.twitter.com/1/urls/count.json not working
Where did you find that endpoint documented on our developer website? This is not a valid URL.
its a old code. already implemented for gettting twitter tweet counts. now only its showing 500 error.
That was never a documented or supported Twitter API so it is no surprise that it does not work for you.