Here I use some pictures I found on the internet. Clicking on the image links you to the original site.
The next picture shows the way to count dorsal rows. Row number 9 is the middorsal row.
The first ventral scale to count is the first one that touches a scale belonging to the dorsal row. The last one is the one touching the anal scale(s).