Count a "similar sequence"

Is there a way to count a sequence of data as long as they are similar?

We have a datasheet were the sales of our sales men are imported.

One of the information we’re using is counting for how long one sales man has been on top.

Ex.:

Sales man#1

Sales man#1

Sales man#1

Sales man#2

Sales man#1

Sales man#3

Is here a way that calc can detect that the data is changing and stop the counting?

The above sample should return 3

Looking forward to any suggestion.

May be so?

Count of sequence

If the list is in B6:B11 then this should count the number at the top of the list that are the same as B6.

=MATCH( 0,$B$6=B6:B11,0 )-1