DF-4788 fixed index count calculation