Modified countmat