If the premium members belong to a certain usergroup, you could do a query in a plugin and get the count, then use the value in a template. Also, unless you really want it to update as soon as someone else joins, you could put it in a scheduled task and write it to the datastore, so that it won't add a query to each page load. So maybe something like:
Code:
$premium_gid = X;
$result = $vbulletin->db->query_first_slave("SELECT COUNT(*) AS members FROM " . TABLE_PREFIX . "user WHERE usergroupid=$premium_gid");
if ($result)
{
build_datastore('premium_members', $result['members']);
}
Maybe using hook cron_script_cleanup_hourly. Then in another plugin on init_startup:
Code:
$new_datastore_fetch[] = 'premium_members';
Then manually run the Hourly Cleanup scheduled task to store a value, then you can use {vb:raw vbulletin->premium_members} in whatever template you want.