Refactor card list count plugin