I'm trying to figure out how to count the change of status or string in a list. For example here is a list ...

ABC
ABC
ABC
xyz
xyz
xyz
ABC
ABC
xyz
ABC

I want to keep count of the change from ABC to xyz. So for this example the count would be 2 as it changed from ABC to xyz two times. 

Thanks.