foreach ($db->author()->order("name") as $author)
SELECT id, name, web
FROM author
ORDER BY name
$author->application()->count("*")
SELECT COUNT(*), author_id
FROM application
WHERE (application.author_id IN (114, 102, 111, 103, 101, 110, 106, 109, 107, 112, 108, 113, 105, 104))
GROUP BY author_id
$author->application()->via("maintainer_id")->count("*")
SELECT COUNT(*), maintainer_id
FROM application
WHERE (application.maintainer_id IN (114, 102, 111, 103, 101, 110, 106, 109, 107, 112, 108, 113, 105, 104))
GROUP BY maintainer_id