help writting code

hello I am new to programing

You need to do it to get better at it. Having someone else write the code for you won't teach you anything.

You need to detect when the switch is pressed and was not before. This requires, of course, that you keep track of the previous state.

When the switch is pressed, but was not before, increment a counter.

Independently of the switch reading, use the value in the counter to determine how many/which LED pin to turn on or off.