Counting Dope Matrices