Small fix in adjacent intervals count