How to calculate count of issues in current customfield history step

Hi, dear community, could you please help me with calculating customfiled history.

I,m want to see 2 columns:

  1. How many issues was in current customfield value on end of period
  2. How many issues was in current customfield value on end of period and was in this value stay more than 48 hours

For first measure I,m create that calculation:
([Measures].[Issues history], [Transition field].[Шаг], [Шаг].[03.00 BSC ПРОВЕРИТЬ И ПРОВЕСТИ ДАННЫЕ В СИСТЕМЕ])

Can you please help me with second?

Thx!