Display the number of tweets for each page or post

function tweetCount($url) {
$content = file_get_contents(“http://api.tweetmeme.com/url_info?url=”.$url);
$element = new SimpleXmlElement($content);
$tweets = $element->story->url_count;
echo $tweets.” tweets!”;
}

<?php tweetCount($post->permalink); ?>


number of tweets