No, your union pension is not counted as working. If you are getting SS benefits and you continue to work, the benefits are reduced if you earn over a certain amount. For 2019 that amount is $17,640--but your pension benefits are not money you earned by actively working.
Before you start getting the SS benefits though, you should find out if there are any other restrictions or effects you could have from getting your pension at the same time as your SS. There are certain "windfall" rules that cause your SS benefits to be offset by a pension. Best to find out from the SS office if you might be subject to that.
https://www.ssa.gov/planners/retire/wep.html
**Disclaimer: Every effort has been made to offer the most correct information possible. The poster disclaims any legal responsibility for the accuracy of the information that is contained in this post.**