Use collection's count method if it exists

This ensures better support for, e.g. ORM
querysets
EAFP