As I am not an instructor/DM, I log all of my dives, in whatever cheapo notebook I have at the time.
Sometimes that means that I write the basic figures for depth and time, as well as site, date, time, exposure suit, gas, gas consumption, type of dive.
During my DM training I would often have a page in my notebook that listed the bare bones of 5-10 dives, but overleaf a more complex log of events for 1 dive that totalled 2 pages.
Perhaps this was because I was repeatedly diving the same site, with little change from previous logs, or I was assisting a course, therefore I would log for example, 'OW 3'. My more DM specific notes remained separate from my dive log notebook and went in to my DM notebook.
Only things that need logging are logged, whether that's because I learned something new, had a problem to overcome, saw something exciting, identified a new (to me) critter etc.
The depth and length aren't really of any consequence as I hope my dives are of a reasonable length. For any dive that is cut short I would probably find myself with something to log about, be that personal or buddy's problem, weather etc. Few of my dives are less than 45mins, but a 70min 5m max dive is just as worthwhile logging as a 20min 30m max dive with an air hippo.
5 mins in a quarry with an unfixable free flow might get a log, it might just get a verbal discussion, and be logged as part of the following dive.
It is logged to make a record of the experience, what happened, why, and what was learned, not to score a woo hoo now I have 50 dives point.
The more inspiring dives necessitate a logging more thoroughly.
I imagine most instructors still maintain a record of all their tedious 5m OW/DSD dives, is it a requirement?
Hopefully I will always find something of interest to log in some form after every dive, If I don't it may be time to take up another leisure activity. The logs are always interesting to revisit to re read, and to provide an idea of what exposure suit, weight I might use, or gas I might consume.
To conclude,
Log all dives, all logged dives count.
But, if a potential divemaster candidate is struggling to determine if they have 40 or more dives I would strongly suggest that they just do some more diving.
We know that PADI changed the minimum from 20 to 40 so that DMs could complete the required number of 60 dives more easily during the course, instead of increasing it so that students would join the course with more experience. Silly PADI
Nic