I'm not sure how to explain this, sorry. I want to know the maximum/most number of rows that are between a specific number in a column, even though there would be many of that specific number.

Example:

1.jpg

I want a formula/function that would give me (4).