title: Find the number of transitions for certain value within a list of values
body: <p>I have a table include &quot;ID&quot; and &quot;Values&quot;, and wanted to know how many times does value &quot;A&quot; jumped into another values like below</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>Values</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>A</td>
  </tr>
  <tr>
  <td>1</td>
  <td>A</td>
  </tr>
  <tr>
  <td>1</td>
  <td>A</td>
  </tr>
  <tr>
  <td>1</td>
  <td>B</td>
  </tr>
  <tr>
  <td>1</td>
  <td>A</td>
  </tr>
  <tr>
  <td>1</td>
  <td>B</td>
  </tr>
  <tr>
  <td>1</td>
  <td>B</td>
  </tr>
  <tr>
  <td>1</td>
  <td>C</td>
  </tr>
  <tr>
  <td>1</td>
  <td>C</td>
  </tr>
  <tr>
  <td>1</td>
  <td>C</td>
  </tr>
  <tr>
  <td>1</td>
  <td>A</td>
  </tr>
  <tr>
  <td>2</td>
  <td>A</td>
  </tr>
  <tr>
  <td>2</td>
  <td>A</td>
  </tr>
  <tr>
  <td>2</td>
  <td>B</td>
  </tr>
  <tr>
  <td>2</td>
  <td>A</td>
  </tr>
  <tr>
  <td>2</td>
  <td>B</td>
  </tr>
  <tr>
  <td>2</td>
  <td>C</td>
  </tr>
  <tr>
  <td>2</td>
  <td>B</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Expected Result:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">ID</th>
  <th style="text-align: center;">Values</th>
  <th style="text-align: right;">Desired Output</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">A</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">A</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">A</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">B</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">A</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">B</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">B</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">C</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">C</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">C</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">A</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">A</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">A</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">B</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">A</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">B</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">C</td>
  <td style="text-align: right;">0</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">B</td>
  <td style="text-align: right;">0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The final table should be like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>Number of Transitions</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>2</td>
  </tr>
  <tr>
  <td>2</td>
  <td>2</td>
  </tr>
  </tbody>
  </table>
  </div>