This basically came from Tao's analysis book, (volume I, ex. 11.8.5)
And I'm not sure whether it is the case where I computed incorrectly or it is an error in the book.
So since we integrating the constant function the integral should be equal to $sgn[[-1,1]]$ where $\alpha [<a,b>]$ is calculated as $\alpha (b)- \alpha (a)$ thus we should get $$sgn(1)-sgn(-1)=1-(-1)=2.$$
I think that a small explanation here would be nice.
If you are working with d f(x), it is usually worth it to write it as f'(x) dx. Now, sgn'(x) does not exist as a function but as one does by introducing the number i in complex analysis one can define something similar here, namely distributions. Mathematically, we can define the delta dirac distribution $\delta$ as an operator that if applied to a function f, it returns f(0) (one could see this operation as integration of $\delta\cdot f$ over any region that contains 0).
Derivatives of a function such as sgn(x) can also be defined in the setting of distribution theory and it might come as no surprise that $sgn'(x) = 2\cdot\delta(x)$ with $\delta$ the dirac distribution (since this function has a jump of size 2 at 0). This means that if you integrate 1 against d(sgn), one could also view this as integrating $1\cdot(2\cdot\delta(x))$ against $d x$. Since 0 is contained in the interval over which you are integrating, this implies that the answer is 2 (the integral over $\delta(x)$ equals 1)