The now() scalar function returns a datetime value, and you have date values in the source data. Comparisons between the two will unfortunately fail. The workaround is to convert now() to a date value:
=QUERY(A1:D6;"select B, count(A) where D < toDate(now()) group by B pivot C")
As an aside, there is a limitation (bug?) with the QUERY function whereby the now() scalar function does not (necessarily) operate in the time zone of your spreadsheet, and there doesn't appear to be any way of modifying this behaviour. I believe that the now() scalar function will always return the current time in Pacific Daylight Time (eg US west coast). So for me, right now in Brisbane, Australia, toDate(now()) used in a QUERY select clause returns yesterday's date.
The safer bet is to use a spreadsheet function to generate today's date, and concatenate that into the QUERY clause:
=QUERY(A1:D6;"select B, count(A) where D < date '"&TEXT(GoogleClock();"yyyy-MM-dd")&"' group by B pivot C")