As Yama and Shani are brothers and even have similar kind of work (to judge our karmas), did they ever confront each other while performing their duties? Is any such event explained in our scriptures?
Both Yama and Shani have different works to do. Yama judges our karmas, while Shani counts them. Each intake and outtake of air inside our body is considered to count Ayu of a living creature, and this counting is done by Shani mahadev.
I heard this from an episode published in TTD channel (but I don't remember when).
Shani has two sons who will take care of every karma (both good and bad, I guess one son documents good and another bad) of every living creature and record is submitted to Chitragupta in Yamaloka. Chitrgupta will announce good and bad karmas of all souls who enters the Yamaloka and Yamadharmaraya decides to punish or send to Swargaloka.