count now takes date (fixes #49)
merge conflicts fixes