title: IOS9 - cannot invoke 'count' with an argument list of type '(String)'
body: <p>I just migrate to Xcode7/IOS9 and some part of my code are not compatible.</p>
  
  <p>i get the following error from Xcode : </p>
  
  <p>" cannot invoke 'count' with an argument list of type '(String)' "</p>
  
  <p>This is my code : </p>
  
  <pre><code>let index   = rgba.startIndex.advancedBy(1)
    let hex     = rgba.substringFromIndex(index)
    let scanner = NSScanner(string: hex)
    var hexValue: CUnsignedLongLong = 0
  
    if scanner.scanHexLongLong(&amp;hexValue)
    {
      if count(hex) == 6
      {
        red   = CGFloat((hexValue &amp; 0xFF0000) &gt;&gt; 16) / 255.0
        green = CGFloat((hexValue &amp; 0x00FF00) &gt;&gt; 8)  / 255.0
        blue  = CGFloat(hexValue &amp; 0x0000FF) / 255.0
      }
      else if count(hex) == 8
      {
        red   = CGFloat((hexValue &amp; 0xFF000000) &gt;&gt; 24) / 255.0
        green = CGFloat((hexValue &amp; 0x00FF0000) &gt;&gt; 16) / 255.0
        blue  = CGFloat((hexValue &amp; 0x0000FF00) &gt;&gt; 8)  / 255.0
        alpha = CGFloat(hexValue &amp; 0x000000FF)         / 255.0
      }
  </code></pre>