add more checks for computing clamp counts, remove dead code

BUG=448299

Review URL: https://codereview.chromium.org/886473003
4 files changed