vim: removing multiple lines - d3d vs 3dd

I was speaking with my friend about removing multiple lines while using vim. They said they use d3d to remove 3 lines, whereas I use 3dd

I understand my command is: 3 (repeat 3x) dd (delete the entire line)

And my friend's command is of the form ["x]d{motion} i.e. Delete text that {motion} moves over [into register x].

However, I don't think 3d is a valid motion. Is it?

I don't understand why this d3d command works in vim


Solution 1:

I ended up asking this same question on Vi Stack Exchange and got an informative answer. You can follow it here: Page on VI stack Exchange answering this question

The relevant part is the TLDR:

tl;dr [count]d is not (a) valid (Motion) in Normal mode, but it is valid in Operator-pending mode when the current Operator is d.