Some tweaks to how commands are counted, fixes #22