hotfix resource.count method_missing issue