title: PostgreSQL - select count of repeated continuous sequences
body: <p>I have the following table/data:</p>
  
  <pre><code>| user_id | action_id | data        |
  ------------------------------------- 
  | 10      |    1      | fly         |
  | 10      |    2      | train       |
  | 10      |    3      | fly         |
  | 10      |    4      | fly         |
  | 10      |    5      | fly         |
  | 10      |    6      | train       |
  | 10      |    7      | fly         |
  | 10      |    8      | train       |
  | 10      |    9      | fly         |
  | 10      |   10      | fly         |
  </code></pre>
  
  <p>Is there a way in postgresql to count repeated continuous 'fly' occurrences?  In this example, the results should be:</p>
  
  <pre><code>counts
  ------
    1  
    3
    1
    2
  </code></pre>