When performing a clip operation on a dataframe...
df = df.clip(lower_bound, upper_bound)
... I'd like to get the number of elements that has been replaced, that is: the number of items below the lower_bound and above the upper_bound.
What is the most efficient way of doing that?