How to properly write an equation for counting number of times a threshold is exceeded?

111 Views Asked by At

Basically, I have a function, and if it exceeds a threshold, I want to increment my value by 1. I want to write this mathematically, and I feel it should look something like this

$$y = \sum_i x'_i-x_i > \gamma$$

but this seems sloppy. Basically, $y$ is the number of times that $x'_i -x_i > \gamma$. Is there a way to use the delta function to make this look cleaner?