the first function counts the times the loop has cycled
No, it does. The first function subtracts one number from another.
The second function divides one number by 2.
Hardly the best use of functions.
class LiquidCrystal_I2C : public Print {
The library you are using inherits from the Print class which knows how to convert numbers to strings.
Just use lcd.print(someIntegerVariable); to make that happen.
analogWrite(ledPinGREEN, 1023);
You REALLY ought to hit the reference page for a while.