st.button('Increment', on_click=increment_counter)
st.write('Count = ', st.session_state.count)
```
Now, pressing the Increment button updates the count each time by calling the increment_counter() function.
Example 3: Use args and kwargs in Callbacks
Callbacks also support passing arguments using the args parameter in a widget:
```python
import streamlit as st
st.title('Counter Example using Callbacks with args')
if 'count' not in st.session_state:
    st.session_state.count = 0
increment_value = st.number_input('Enter a value', value=0, step=1)
def increment_counter(increment_value):
    st.session_state.count += increment_value
increment = st.button('Increment', on_click=increment_counter,
    args=(increment_value, ))
st.write('Count = ', st.session_state.count)
```
Additionally, we can also use the kwargs parameter in a widget to pass named arguments to the callback function as shown below:
