Trigger an automation when a counter equals an input number

I cant seem to get this to work. I can use a numeric state trigger but that wont work in my situation.
Template trigger may work but Im not sure how to configure.
Example of what I have tried:

platform: state
  - counter.counter_1
to: input_number.input_number_1

If I manually enter a number into the to slot, it woks as expected. Its like its not reading that input number.

The state trigger does not support other entities in the to: field. Like the numeric_state trigger does for above and below.

You can use a template trigger if they must be equal rather than above or below.

Yeah,above or Below wont work for me. I need equals.
How would I configure that trigger? I cant seem to get it…

  - platform: template 
    value_template: "{{ states('counter.counter_1') | int(0) == states('input_number.input_number_1') | int(0) }}"

Awesome, thanks.
The documentation leaves alot to be desired in some situations. I guess they really cant cover every situation though.
Thanks again for your time.

Yeah that would not be feasible, but they cover the basics so you can learn how to do what you want.