Find time gaps and count them