Life Cycle Methods Int


I found this challange for Lifecycle " For each of the life cycle methods, when they get called, increment a count that indicates how many times that method has been called. Then update the TextView for that life cycle method to update the count field.
Decide what makes up the “state” of your app. Usually these are class fields contain relevant data. In this case of , the relevant data will be the life cycle counts. Therefore, you will need to define an onSaveInstanceState method."
I have my
protected void onStop() {
So i do
public void onSaveInstanceState(Bundle savedInstanceState) {
Log.i(TAG, “onSaveInstanceState”);
savedInstanceState.putInt(KEY_INDEX, mCurrentIndex);

How do i know how many times method has been called and how do i update the count.

Thank you