... einfach nur Photos zählen, die den beiden kommentierten Bedingungen genügen.
SELECT
count(*) as numberOfPhotos
FROM
photo p
WHERE
EXISTS (SELECT 1 FROM article a WHERE a.id=pfk_article AND a.language = 'de' AND a.status = 'published')