Add basic counting features of AttackDefend and tests.