As far as the idea behind Challenge 2 is clear, the concrete solution of it could be done in a very simple way, considering that TasksViewModel already has sectionedItems property, - just subscribe to it in the bindViewModel():
viewModel.sectionedItems
.subscribe(onNext: { [weak self] items in
DispatchQueue.main.async {
self?.statisticsLabel.text = "Due: \(items[0].items.count) Due: \(items[1].items.count)"
}
})
.disposed(by: self.rx.disposeBag)
I mean, all hint steps are already implemented in that property.