I have one problem which goes like this: "In how many ways can $10$ letters be placed in $10$ addressed envelope such that exactly $9$ letters are in correct envelope?"
If I understand the problem correctly this is similar to counting derangement with exactly $r$ matches,I don't know how to do it,please help.