The other day I asked a question ([here](https://stackoverflow.com/questions/38405653/using-a-custom-bindinghandler-to-update-width-of-elements-in-knockout-js)). Someone kindly replied, and their answer does what I orginally intended it to do. However, there's some code I don't understand and I was hoping someone could help me.

```
   self.currentlySelected = ko.computed(function() {
     return self.topics().reduce(function(count, topic) {
      return count + (topic.selected() ? 1 : 0);
     }, 0);
   });

```

Would anyone be kind enough to explain what this function is doing? Thank you!