Improved check for count filter argument.

Because equals operator can be overloaded for filter, use `is` to verify that `filter` argument is omitted.

This should fix #1992