def METHOD_NAME(
    ansible_repo_factory,
    ansible_git_remote_factory,
    ansible_sync_factory,
    ansible_collection_version_api_client,
):
    """A helper fixture to perform a sync and return the count in the repo now."""
    def _sync_and_count(remote_body, repo=None, **sync_kwargs):
        if repo is None:
            repo = ansible_repo_factory()
        previous_latest = repo.latest_version_href
        remote = ansible_git_remote_factory(**remote_body)
        sync_kwargs.update({"remote": remote.pulp_href})
        repo = ansible_sync_factory(repo, **sync_kwargs)
        assert repo.latest_version_href != previous_latest
        c = ansible_collection_version_api_client.list(repository_version=repo.latest_version_href)
        return c.count
    yield _sync_and_count