Check out example codes for "get item filter count swift". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com