You put the counter inside the onClick function, causing it to reset every time. So, move
int clicked = 0;
from inside the onClick to before your onCreate such as:
int clicked = 0;
@Override
protected void onCreate....
This will make it set to 0 once, then stay equal to whatever it's last value was as long as the app is open and not killed.