compute_count: preserve date and time types. Fixes #235