fix count bug: interval is too long