Most 5mm LEDs have their brightness and forward voltage rated at a current of only 20mA. Some of mine have a maximum allowed continuous current of 30mA.
Four 2.2V LEDs in series use 8.8V then the current-limiting resistor will use the remaining 3.2V, then for 20mA the resistor will be 3.2V/20mA= 160 ohms.
But the forward voltage is not a fixed voltage, it is a range of voltages so the actual forward voltage of your green LEDs might be 1.8V then four of them use 7.2V and the 160 ohm resistor with the remaining 4.8V across it would limit the current to 4.8V/160 ohms= 30mA which might cause the LEDs to fail soon.
Your red LEDs might have a forward voltage of only 1.8V and four will need a current-limiting resistor of 220 to 240 ohms.
Four 2.2V LEDs in series use 8.8V then the current-limiting resistor will use the remaining 3.2V, then for 20mA the resistor will be 3.2V/20mA= 160 ohms.
But the forward voltage is not a fixed voltage, it is a range of voltages so the actual forward voltage of your green LEDs might be 1.8V then four of them use 7.2V and the 160 ohm resistor with the remaining 4.8V across it would limit the current to 4.8V/160 ohms= 30mA which might cause the LEDs to fail soon.
Your red LEDs might have a forward voltage of only 1.8V and four will need a current-limiting resistor of 220 to 240 ohms.