I was trying to increment count as when a potential sequence was beginning. Save it to a different variable and as soon as the sequence was broken reset count but have the longest sequence still saved.