There is another way to do this: the AngularJS filters.
You can write this:
var selectedCount = $filter('filter')($scope.students, { isSelected: true }).length;
There is another way to do this: the AngularJS filters.
You can write this:
var selectedCount = $filter('filter')($scope.students, { isSelected: true }).length;