fix bug allowing negative count numbers