   }
 
   func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
-    return self.collection[component].countOfItems
+    return sections[component].rows.count
   }
 }
 

import UIKit

final class PickerViewController: RevertViewController {
  fileprivate let collection = CollectableCollection<Country>(items: .capitalCities)
}

// MARK: - UIPickerViewDataSource

extension PickerViewController: UIPickerViewDelegate {

  func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
    return sections.first?.rows[row].name
  }
}
