Optimize leaf? method

```SQL
SELECT COUNT(*) FROM "product_groups" WHERE "product_groups"."parent_id" = 24545 AND (company_id = 98154223)
vs
SELECT 1 FROM "product_groups" WHERE "product_groups"."parent_id" = 24545 AND (company_id = 98154223) LIMIT 1
```