same thing here. I would just make a key string "domain:referrer" and a dp_map (http://docs.python.org/2/library/stdtypes.html#typesmapping) to keep both the pairs and the counts.