have a look at function block "ABSROT". It might help you solve your task. Just set the lolim and hilim parameters as a range of the counter output.
Let us know if you managed get the desired behaviour.
Questions about REXYGEN Studio
Questions about REXYGEN HMI Designer and other HMI possibilities