Up and down counter for roller shutter

Hi I’m looking for an up and down counter for my roller shutter, I also want to monitor the position. I use wago modbus with two separate outputs to control my roller shutter.
I’ve been looking for a long time but can not find anything, who can help me?

Maybe this is something you could use: