Application.Controllers.controller('_toolbarTags',
    ["$scope", "mcapi", "pubsub", function ($scope, mcapi, pubsub) {
        pubsub.waitOn($scope, 'tags.change', function () {
            $scope.tagsCount();
        });

        $scope.init = function () {
            mcapi('/tags/count')
                .success(function (data) {
                    $scope.tags = data;
                }).jsonp();
        };

        $scope.init();
    }]);
@@ -125,44 +125,26 @@
     
-pubsub.waitOn(
 $scope
-, '
+.
 tags
-.change',
+Count =
  fun
@@ -170,27 +170,28 @@
     
-$scope.
+mcapi('/
 tags
-C
+/c
 ount
-();
+')
 %0A   
@@ -199,21 +199,16 @@
     
-%7D);%0A%0A
         
 $sco
@@ -207,68 +207,102 @@
     
-$scope.init = function () %7B%0A            mcapi('/tags/count')
+.success(function (data) %7B%0A                    $scope.tags = data;%0A                %7D).jsonp();
 %0A   
@@ -302,32 +302,36 @@
 ();%0A        
+%7D;%0A%0A
         
 .success(fun
@@ -314,33 +314,61 @@
 %7D;%0A%0A        
-.success(
+pubsub.waitOn($scope, 'tags.change', 
 function (da
@@ -357,36 +357,32 @@
 nge', function (
-data
 ) %7B%0A            
@@ -385,60 +385,105 @@
     
-        $scope.tags = data;%0A                %7D).jsonp
+$scope.tagsCount();%0A        %7D);%0A%0A        $scope.init = function () %7B%0A            $scope.tagsCount
 ();%0A

Define tagsCount()