The easiest i could think of is Total ways - Ways that give you More than 13( if you are talking not greater than 13)
To count the no of ways you can think of how to distribute the loss from 18 to the 3 digits
So ways to get
18 = 6-6-6 =1 [NO LOSS]
17 = 6-6-5 =1*3(ways of arrangement) =3 [ LOSS OF 1 ,distributed in 1-0-0]
16 = 6-6-4 =1*3 = 3 [LOSS OF 2 , distributed in 2-0-0]
= 6-5-5= 1*3 = 3 [LOSS OF 2, Distributed in 1-1-0]
15 = 6-6-3= 1*3 = 3 [Loss of 3, distributed in 3-0-0]
= 6-5-4= 1*6 = 6 [Loss of 3, distributed in 2-1-0]
= 5-5-5= 1*1 = 1 [Loss of 3, distribuuted in 1-1-1]
14 = 6-6-2= 1*3 = 3
= 6-5-3= 1*6 = 6
= 6-4-4= 1*3 = 3
= 5-5-4= 1*3 = 3
So No of ways of rolling dice so as not to get more than 13 = 216 - 35 =181
if you want to include 13,count for that too