This is what I have in my template.php file:
function twitter_count() {
$pageID = 'TWITTERACCOUNT';
$info = json_decode( file_get_contents('https://api.twitter.com/1/users/show.json?screen_name=' . $pageID .'') );
echo $info->followers_count;
}
And I have this to display the result within a block:
<?php echo number_format(twitter_count("TWITTERACCOUNT") ); ?>
This is the result:
36170
Try
Or
And also remove that echo from your function. Instead, do a return.