Swift complexities with Dictionary
The following looks like it is much simpler and most of the way there:

func countLetters (string:String) -&gt; String {
  var dict : [Character:Int] = [:]
  for letter in string {
    dict[letter] = 1 + (dict[letter] ?? 0)
  }

 //  dict -&gt; array of tuples -&gt; sort based on tuple .0
 var dictSorted = map(dict) { $0 }.sorted { $0.0 &lt; $1.0 }

 // your string to return.
 return " ".join (dictSorted { (key,val) -&gt; String in return "\(key):\(val)" })
}