import requests


def breeding_compatibility(pokemon_species_url: str, pokemon_name: str) -> int:
    """Function to get the number of breeding matches
    for a specified pokemon.

    Args:
        pokemon_species_url (str): URL to get pokemon's base
        form data from pokeAPI.
        pokemon_name (str): Pokemon name to search for breeding matches

    Returns:
        int: Number of breeding matches for specified pokemon.

    """
    matches = set()
    pokemon_egg_group_data = requests.get(url=pokemon_species_url + pokemon_name)\
        .json()['egg_groups']
    egg_groups_urls = [egg_group['url'] for egg_group in pokemon_egg_group_data]
    for url in egg_groups_urls:
        egg_group_data = requests.get(url=url).json()
        matches |= {poke['name'] for poke in egg_group_data['pokemon_species']}
    return len(matches)