```python
def slot_hits(keys: list, slots: int) -> int:
    if not isinstance(keys, list):
        raise ValueError("keys must be a list of integers")
    
    for key in keys:
        if not isinstance(key, int):
            raise ValueError("all keys must be integers")
    
    if slots <= 0 or not isinstance(slots, int):
        raise ValueError("slots must be a positive integer")
    
    cache = [None] * slots
    
    total_hits = 0
    for key in keys:
        slot_index = key % slots
        if cache[slot_index] == key:
            total_hits += 1
        else:
            cache[slot_index] = key
    
    return total_hits
```