simplistic port of downloadCounts.py