title: Swift Comparison in consecutive numbers inside array and its count
body: <p>How can I compare the two consecutive numbers in an array and find its count. <br></p>
  
  <pre><code>let numberArray = [1,2,4,6,7,10,12,13]
  // I want to compare two consecutive numbers like [1,2], [4,6], [7,10], [12,13]
  </code></pre>
  
  <p>For example: <br>
  First, I want to calculate difference of the first two numbers[1,2(difference=1)]in the array, then the next two numbers[4,6(difference=2)], then[7,10(difference=3)] and [12,13(difference=1)] at last.<br>
  Lastly, I want to count a number of difference that has 1. In this case the count is 2.</p>
  
  <p>What method should I use for this one?</p>
  
  <p>Thanks in advance. </p>