Counting: fixes #724 and fixes big bug in the box interaction