$scope variable getting undefined

when am trying to use a $scope variable in the view am getting undefined but when am using am $scope function it get a result, like

$scope.ccount = $rootScope.ordercount; // this not work

$scope.ccount = function() { return $rootScope.ordercount; } // this work

so what is the problem ??