     subscript(integerRange: Range<Int>) -> String {
         let start = self.startIndex.advancedBy(integerRange.startIndex)
         let end = self.startIndex.advancedBy(min(self.characters.count, integerRange.endIndex))
-        
         let range = start..<end
         return self[range]
+    }
+    
+    func countChars() -> Int {
+        return characters.count
     }
 }
 
 extension Int {
+    
     func countDigits() -> Int {
         var n = self
         var sum = 0

    func extract(input: String) -> [Int] {
        if input.isEmpty {
            return []
        } else if input[input.startIndex] == "," {
            return extract(input[1..<input.characters.count])
        } else if input.containsString(",") {
            let currentNumber = extractCurrentNumber(input)
            let restOfNumbers = extract(input[currentNumber.countDigits()...input.characters.count])
            return [currentNumber] + restOfNumbers
        } else {
            return [extractCurrentNumber(input)]

        }
        
    }
    
    private func containsDelimiter(input: String) -> Bool {
        return input.containsString(",")
    }
    
    private func isFirstCharADelimiter(input: String) -> Bool {
        return input[input.startIndex] == ","
    }
    
}

extension String {
