Counting number of rows 2 dates fall between

I am trying to find the number of rows that 2 dates fall between. Basically I have an auth dated 1/1/2018 - 4/1/2018 and I need the count of pay periods those dates fall within.

Here is the data I am looking at:

  create table #dates
  (pp_start_date  date,
  pp_end_date date)

  insert into #dates (pp_start_date,pp_end_date)
values ('2017-12-28','2018-01-10');
  insert into #dates (pp_start_date,pp_end_date)
values ('2018-01-11','2018-01-24');
  insert into #dates (pp_start_date,pp_end_date)
values ('2018-01-25','2018-02-07');
  insert into #dates (pp_start_date,pp_end_date)
values ('2018-02-08','2018-02-21');
  insert into #dates (pp_start_date,pp_end_date)
values ('2018-02-22','2018-03-07');
  insert into #dates (pp_start_date,pp_end_date)
values ('2018-03-08','2018-03-21');
  insert into #dates (pp_start_date,pp_end_date)
values ('2018-03-22','2018-04-04');
  insert into #dates (pp_start_date,pp_end_date)
values ('2018-04-05','2018-04-18');

So when I run this query,

SELECT ad.pp_start_date, ad.pp_end_date, orderby
from (select 
row_number()over ( order by pp_start_date) as orderby, * from
   #dates) ad
  where  '2018-01-01' <= ad.pp_end_date
I somehow want to only get 7 rows.  Is this even possible? Thanks in advance for any help!

WHERE ad.pp_end_date >= '20180101' AND (ad.pp_end_date <= '20180401' OR ad.pp_end_date BETWEEN ad.pp_start_date AND ad.pp_end_date)

Ok so using a count(*) worked to get the number of rows but now I am trying to get the number of rows for 2 dynamic dates form another temp table but I don't see a way to relate the data.
Using the #dates temp table referenced above gives me the date data. Now using this data:

create table #stuff
([month] date,
[name] varchar(20),
units int,
fips_code int,
auth_datefrom date,
auth_dateto date)


  insert into #stuff (month,name,units,fips_code,auth_datefrom,auth_dateto)
values ('2018-01-01','SMITH','50','760', '2018-01-01', '2018-04-01');

  insert into #stuff (month,name,units,fips_code,auth_datefrom,auth_dateto)
values ('2018-01-01','JONES','46','193', '2018-01-01', '2018-04-01');

  insert into #stuff (month,name,units,fips_code,auth_datefrom,auth_dateto)
  values ('2018-01-01','DAVID','84','109', '2018-02-01', '2018-04-01');

I want to somehow create a statement that does a count of rows from the #dates table where the auth dates are referenced in the #stuff table I just can't figure out how to relate them or join them.

pp_start_date <= auth_dateto and pp_end_date >= auth_datefrom

Got it!
SELECT t1.,
(SELECT COUNT(
)
FROM #dates t2
WHERE t2.pp_start_date <= t1.auth_dateto
AND t2.pp_end_date >= t1.auth_datefrom ) AS Periods
FROM #stuff t1