The number of daes that a lead sits at a specific status can be captured by a process with a daily timer. A separate custom field is used to store the number of days on each stage, so you will need to create those custom fields prior to creating the process.
Select the Opportunities base module and set the record type to New Records Only. This process will use an internal timer to count the days, so existing record updates are not desired.
The timer will be set to 1 day.
Set the operation to Load Module and the Module to Opportunities. The Source ID is set to [ID] so that it will load the record that started the process.
The Field Prefix can be left blank so that the values are loaded into the process variables.
The field list can be left blank so that all fields are loaded.
One task will be need for each status of the opportunity. Each task will have the Save Module for Opportunities and use ID as the source. The expression will increment the appropriate field for the current stage value. For example, when the sales stage is Prospecting, DAYS_PROSPECTING_C is set to the expression:
DAYS_PROSPECTING_C + 1
For each task, the connecting path should have the appropriate filter. For the first task, set SALES_STAGE == “Prospecting”.
The end event has no settings and this path from the gateway will not have an expression so that it will be the default.