def METHOD_NAME(environment):
    """Find role counts in heat environment files"""
    role_counts = {}
    for env_file in environment:
        try:
            with open(env_file, 'r', encoding='utf-8') as envfile:
                data = yaml.safe_load(envfile.read())
            if data is not None:
                for param, val in data.get('parameter_defaults', {}).items():
                    if param.endswith('Count'):
                        role_name = param[:-5]
                        try:
                            role_count = int(val)
                        except ValueError:
                            continue
                        role_counts[role_name] = role_count
                        LOG.info(
                            "Found role count param '%s: %d' "
                            "in environment file '%s'",
                            role_name,
                            role_count,
                            env_file
                        )
        except Exception:
            LOG.exception("Failed to parse environment file %s", env_file)
            continue
    return role_counts