def get_external_deps_data(external_deps_by_use_count, external_dependencies, rows_count):
    """
    Builds table rows list containing data about external dependency use counts (most/least).

    :param external_deps_by_use_count: list of external dependencies by use count (least to most)
    :param external_dependencies: dict with all external dependencies
    :param rows_count: number of rows to build
    :return: the requested table rows
    """
    data = [
        ("-----------------------------", "-----", "------------------------------", "-----"),
        ("Most Used External Dependency", "Count", "Least Used External Dependency", "Count"),
        ("-----------------------------", "-----", "------------------------------", "-----")
    ]

    most_used_deps = external_deps_by_use_count[-rows_count:]
    most_used_deps.reverse()
    least_used_deps = external_deps_by_use_count[:rows_count]
    for n in range(0, rows_count):
        top = most_used_deps[n] if len(most_used_deps) > n else None
        bottom = least_used_deps[n] if len(least_used_deps) > n else None

        data.append(
            (
                top if top is not None else "-",
                len(external_dependencies[top]) if top is not None else "-",
                bottom if bottom is not None else "-",
                len(external_dependencies[bottom]) if bottom is not None else "-"
            )
        )

    return data