Refactor code to support user gossip count

Refactor code to support user gossip count