Fix that the count in Segment is less than the number of references actually containing Entry

close gh-31373

Comment From: pivotal-cla

@nihongye Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@nihongye Thank you for signing the Contributor License Agreement!

Comment From: bclozel

I don't think this will solve the issue raised in #31373, I'll expand on that in the issue comments directly. I'm declining this change as a result.