We require the no of solution of the equation X1+X2+X3+X4=18 where 1<=X1,X2,X3,X4<=6. You have form all non increasing solution of the above eq and permuate them.
This method is brute force method and its highly prone to careless mistake. For ans verification you can write a simple programe(https://ideone.com/E9Vym3)