An alternative shorter formula to count days between 2 dates is this:
abs(subtract(daysUntil($datefieldA),daysUntil($datefieldB)))