title: How to get the count of a type conforming to `Sequence`?
body: <p>Let's say I have this code:</p>
  
  <pre><code>func work&lt;S: Sequence&gt;(sequence: S) {
      // do stuff
  }
  </code></pre>
  
  <p>How could I figure out how many elements there are in <code>sequence</code>?<br>
  The obvious version I'd go for is pretty inefficient:</p>
  
  <pre><code>var count = 0
  for element in sequence {
      count += 1
  }
  </code></pre>
  
  <p>There must be a nicer way, right?</p>