Pam has 4 boxes of cookies with 20 cookies each.
So she has a total of 20 x 4 = 80 cookies.
She gave 5 cookies to each of her friends and has 15 cookies left.
So from 80 down to 15, she gave 80 - 15 = 65 cookies to her friends.
65 cookies divided by 5 cookies for each friend,
65/5 = 13
Therefore, she has 13 friends