Getting the number of Saturdays and Sundays in a month
I'll suggest the calendar table also discussed in that thread. It will help for a lot of calculations beside this one. Your query can then be expressed as:

select count( case when DAYOFWEEK(calendar_date) in (1,7) then 1 end)
from Calendar 
where calendar_date between :start_date and :stop_date


or as:

select count(1)
from Calendar 
where calendar_date between :start_date and :stop_date
  and DAYOFWEEK(calendar_date) in (1,7)