Concept Flow - LREM for element removal
Start with Redis List
Call LREM key count value
Scan list from head or tail based on count
Compare each element with value
If match and count not reached, remove element
Continue until count removals done or list ends
Return number of removed elements
End
LREM scans the list and removes elements matching the value up to the count specified, then returns how many were removed.