Improved check for count filter argument.