from typing import Any


def count_wrappers(obj: Any) -> int:
    """Count the number of times that an object is wrapped."""
    i = 0
    while i < 10:
        try:
            obj = obj.__wrapped__
        except AttributeError:
            return i
        else:
            i += 1
    raise RuntimeError("Too many wrappers")