add 'count/repeat' functionality