Additional tests for count()
Cleaner comments, all reduction functions return add, rem, ini, acc, for brevity