get item filter count swift

Swift
let managersCount = peopleArray.filter { (person : Person) -> Bool in
    return person.isManager!
}.count
Source

Also in Swift: