Local State lets you create states in a state machine including the code. This example describes how to create a counter as state.