replace counter module by collections.Counter