How to count (on,off) the button? please help me! i just started


You want count how many times you press a botton? Correct?
Do you know anything about Arduino? Like variables declaration and use, if statement, functions about pins?
If you don't, please lern something by reading a C manual. I don't say it for personal reasons, but only because I think is better for you know something about Arduino if you want to use it.

If you have already written something please show it, so we can discuss about it

There are examples found in the IDE for newcomers.

You should look at these and master them before you proceed any further.