Correctly calculates the tallies in a DRY way, but contains lots of console.log statements.