how do I know if a output is high

I want to start a counter in my project based on if a output is high here is what I tried first with no luck I searched but didnt find anything am I missing something or is this not possable

if (outputpin == HIGH) counter++;

I aslo tried

if (digitalread (outputpin == HIGH)) counter++;

Hello, that should be:

if ( digitalread( outputpin ) == HIGH ) counter++;

Or, since HIGH is like "true", simply this:

if ( digitalread( outputpin ) ) counter++;

in your setup() is pinMode(outputpin, OUTPUT);
and to read it, if(digitalRead(outputpin)==HIGH);

note case in pinMode() and digitiaRead()

Just wondering, if it's an output then you probably use digitalWrite( outputpin, state ) somewhere, so you already know the current value of the output.

yes its an output I actual dont have a PinMode selected it is working as an output so I didnt notice it because the outputs are working I will try it with it included

I just realized that counter was probably the wrong word to use I am wanting to use it as a timer to shut off the output after 5minutes