I'd like to display event counts in a conky window. Things like tasks scheduled for today, within the next 3 days, 15 days, count of pending todo items, etc. Since conky doesn't "talk" org-mode, the next best way is to call a shell script and use its output.
Can I call emacs in batch mode for this? Is there an org-agenda function that prints event counts? Should I do my own parsing instead?