def get_password_leaks_count(hashes, hash_to_check):
    """Return the password leaks count from API response."""
    hashes = (line.split(':') for line in hashes.text.splitlines())

    for h, count in hashes:
        if h == hash_to_check:
            return count

    return 0