count discrete increase intervals