What's with 9.99E+307?
9.99E307, 99^99, 9.99999999999999e+307 -- these are all just very large numbers - larger than any value you're going to have in column B.
@Colin Legg formula returns 1 cell short
It returns 18 for me.