Count overlapping Days

I'm trying to count the # of days overlapping between 2 different ranges of days. I'm using a max and min formula and tried some if statements but i'm coming up short.

Week Start Week End
4-May (A3) 10-May (B3)

Promo Start Promo End Days Test Result
19-May (A6) 20-May (B6) 0 Correct - Zero days overlap
6-May (A7) 19-May (B7) 4 Incorrect - should be 5 days

Formula =MAX(0,MIN(B$3,B7)-MAX(A$3,A7))