=SUMPRODUCT(($a$1:$a$200>=date(2012,1,1))*($a$1:$a$200<=date(2012,1,31))*($b$10:$b$200="YES"))
should do it.