Basic if endif not working and I'm puzzled I got this small code I'm trying things on for like an hour.

int receivers = 0;
#if defined(PPM_RECEIVER)
  receivers++;
#endif


And I just cannot get it working, It keeps returning a "'receivers' does not name a type" on line 4.
You can't use commands like receivers++ outside of a function.  That is runtime executable code, and has to be run from inside a function. Global scope doesn't get executed in the same way as code in a function.