```python
def tally_bar(count: int, width: int) -> str:
    if width <= 0:
        raise ValueError("Width must be greater than zero")
    
    if count == 0:
        return " "
    
    if count > width:
        return "#" * (width - 1) + ""
    
    return "#" * count
```