Fixed the inconsistent count issue after resharding