bugfix-DM-counting