I have an array of objects as follow.
$scope.students = [{\'isSelected\': true}, {\'isSelected\': true}, {\'isSelected\': false}, {\'isSelected\':
You could also use javascript filter method (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
$scope.selectedStudentsCount = function() { return $scope.students.filter(function(obj){return obj.isSelected}).length; }