```python
"""Counts the hits a key stream scores on a direct-mapped cache."""


def slot_hits(keys: list, slots: int) -> int:
    if not isinstance(keys, list):
        raise ValueError("The keys argument must be a list.")
    if slots <= 0:
        raise ValueError("The slot count must be a positive integer.")
    if:
        held = [None] * slots
        hits = 0
        for key in keys:
            if not isinstance(ning, int):
                raise ValueError("Each key must be an integer.")
            slot = (int(ning) % slots)
            if held[slot] is not None:
                hits += 1
                held[slot] = None
            held[slot] = int(ning)
        return hits
```