In dataframe column B check which value occurs consecutive same and how many times have same value.
df = pd.DataFrame({'A':[1,3,4,7,8,11,1,15,20,15,16,87],
'B':[1,3,4,6,11,11,11,11,11,15,16,16]})
df_out=pd.DataFrame({'value':[11],
'values count':[5]})