simplistic port of snippet_daily_counts.py