I was thinking something like above

or you could write a macro something like below to do a max count if all the values where always in column A.
Private Sub cmdCount_Click()
Dim intCurrentCount As Integer
Dim intCurrentRow As Integer
Dim intCountConsecutive As Integer
Dim intMaxCount As Integer
Dim blnFound As Boolean
blnFound = True
intCurrentCount = 0
intCurrentRow = 0
intMaxCount = 0
While blnFound
intCurrentRow = intCurrentRow + 1
If Cells(intCurrentRow, 1) = "" Then
blnFound = False
Else
If Cells(intCurrentRow, 1) > 984 Then
intCurrentCount = intCurrentCount + 1
intCountConsecutive = intCountConsecutive + 1
Else
If intCountConsecutive < 5 Then
If intMaxCount < intCurrentCount Then
intMaxCount = intCurrentCount
End If
intCurrentCount = 0
End If
intCountConsecutive = 0
End If
End If
Wend
Cells(1, 3) = intMaxCount
End Sub