This is the code that senses a press on the green button:
if (greenbuttonval == LOW && greenprevious == HIGH && millis() - greenfirstTime > 200) {
greenfirstTime = millis(); // if the buttons becomes press remember the time
}
it does nothing unless greenprevious=HIGH. You do not initialize greenprevious in your sketch, so this code doesn't get executed.
Still - that should fix itself after you press and release the green button a couple of times. Hmm...
You use the runEvery macro to update the display. This means that the display won't get updated unless the buttons are held down at the one-second mark when the display happens to update ... but that's not a huge deal. Presumably you test this thing by holding down the green button.
if (greenbuttonval == LOW && ((millis() - greenfirstTime) % 1000) < 20 && millis() - greenfirstTime > 500) {
ledblink(1, 50, greenledPin); // Each second the button is held blink the indicator led and
greencount++; // and 1 to the counter
}
Why ((millis() - greenfirstTime) % 1000) < 20
and not simply millis() - greenfirstTime < 20000L
?
In any case, the above fragment won't increment greencount once per second, it will increment it once per loop (thousands of times a second) when greentime is between 1/2 second and 20 seconds.
Personally - I'd just rewrite this thing.