Hello, Djole
Have you tried any aggregation approach?
At first sight I would propose to explore something like
MATCH (post: Post)<-[postRule:POST_RULE]-(rule: Rule) <-[catRule: RULE_CATEGORY]-(category:Category)
WITH post, category, count(*) AS count...