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