Modified DP count to use a record to store mechanism state.