```python
def tally_bar(count: int, width: int) -> str:
    if count > width:
        raise ValueError("Count cannot exceed the specified width.")
    
    return '#' * min(count, width)
```