Python: changed counters output to dict.