refactor set post counts