```python
def team_headcount(chart: dict, name: str) -> int:
    if not isinstance(chart, dict) or name not in chart:
        raise ValueError("Invalid chart or name")
    if not isinstance(chart[name], list):
        raise ValueError("Invalid reports for the given name")
    if not all(isinstance(report, str) for report in chart[name]):
        raise ValueError("Invalid reports for the given name")
    
    count = 1
    for report in chart[name]:
        count += team_headcount(chart, report)
    
    return count
```