How to display a Quick Tab with count? I'd like to display the # (count) of Blogs on my quick tab menu. Ex: Blogs (3)

I found a way to overwrite the quicktab titles using the following function with an if statement

   function mymodule_quicktabs_alter($quicktabs) { 
if ($quicktabs-&gt;machine_name == 'quick_tab_front_page') { 
$quicktabs-&gt;tabs = array(
  0 =&gt; array(
    'machine_name' =&gt; 'quick_tab_blogs',
    'title' =&gt; 'BLOGS',
    'weight' =&gt; '-100',
    'type' =&gt; 'qtabs',
  ),
  1 =&gt; array(
    'machine_name' =&gt; 'quick_tab_news',
    'title' =&gt; 'NEWS',
    'weight' =&gt; '-89',
    'type' =&gt; 'qtabs',
  ),
);
$quicktabs-&gt;renderer = 'quicktabs';
$quicktabs-&gt;style = 'Arrows';
$quicktabs-&gt;options = array();
}
}


I created a view, using the Views module, which contains all the blog titles written by a user.

Now I need to figure-out a way to display the views' count on the quick tab title 

I have tried 

function mymodule_quicktabs_alter($quicktabs) { 
    $view = views_get_view('user_blogs');
    $view-&gt;set_arguments(array($account-&gt;uid));
    $view-&gt;execute(); 
    $count = count($view-&gt;result);
if ($quicktabs-&gt;machine_name == 'quick_tab_front_page') { 
$quicktabs-&gt;tabs = array(
  0 =&gt; array(
    'machine_name' =&gt; 'quick_tab_blogs',
    'title' =&gt; t('Blogs @count', array('@count' =&gt; $count));


but it gives me an error of Fatal error:  Call to a member function execute() on a non-object for the line $view = views_get_view('user_blogs'); 

I don't get why, I am new to php.
Check your view name that you are passing to views_get_view() and also from where are you getting the $account variable from (credits: wolverine).

And get rid off $view-&gt;set_arguments(array($account-&gt;uid));, you don't need it (credits: No Sssweat).