In Objective-C I can sort an NSArray using this statement:
Objective-C
NSArray
NSArray *sortedArray = [persons sortedArrayUsingComparator:^NSComparison
In Swift you can use new approach. Try to use sorted method instead sortedArrayUsingComparator like this...
var sortedArray = results.sorted { (obj1, obj2) -> Bool in return obj1.count! > obj2.count! }