标量的特定值在scala Dataframe中的记录计数

在数据框中,列具有以下输入:

    | id|  priority|         status|       datetime|data_as_of_Date|Amount|open_close|
    |  1|Unassigned|          Fixed| 10/8/2019 0:00| 2/12/2020 0:00|    40|    Closed|
    |  1|Unassigned|            New|2/12/2019 11:00| 2/12/2020 0:00|    20|      Open|
    |  1|Unassigned|Fix in progress|9/12/2019 11:00| 2/12/2020 0:00|    90|      Open|
    |  3|  Critical|        Removed|5/17/2019 12:00| 2/12/2020 0:00|    33|    Closed|
    |  3|Unassigned|Fix in progress|5/26/2019 10:00| 2/12/2020 0:00|    30|      Open|
    |  3|  Critical|            New|  5/8/2019 3:00| 2/12/2020 0:00|    34|      Open|
    |  3|Unassigned|          Fixed| 7/29/2019 7:00| 2/12/2020 0:00|    29|    Closed|

Calculate the count how many times the open_close column got changed per company?