"""SELECT    "app_article"."id",    "app_article"."author",    "app_article"."published",    COUNT(        DISTINCT CASE WHEN "app_readership"."what_time" < 2015-11-18 11:04:00.000000+01:00 THEN "app_readership"."reader_id"        ELSE NULL END    ) as "numviews"FROM "app_article" LEFT OUTER JOIN "app_readership"    ON ("app_article"."id" = "app_readership"."which_article_id")GROUP BY "app_article"."id", "app_article"."author", "app_article"."published\""""
How to annotate Count with a condition in a Django queryset