fixed an issue of resource searching that returns TypeError-count() takes exactly one argument