Added parameters map to the count query, too (fixes #71)