Hello, wondering if anyone could help?

I have a table containing dates detailing when certificates for various things expire for different locations and need to separately count the amount before todays date (expired), any within 30 days, then 90 days, then 180 days.

So

... Expired
... Expires within 1 month
... Expires within 3 months
... Expires within 6 months

I've managed to do the expired bit using =COUNTIF(B1:B35,"<"&TODAY()) but I'm struggling to do the rest no matter how many different variants I've used from looking at websites online. I'm using =COUNTIF(B2:B35,"<"&TODAY()+30) which feels like its working but for some reason it's producing odd results and I don't really understand why. And when I try the same with 90 days it's giving the wrong numbers aswell.

Am I on the right track? Can any one help?

Thanks!