Preheat the oven to 350 degrees. Line cupcake pans with 14 paper liners.
CUPCAKES: In the bowl of an electric mixer fitted with a paddle attachment, cream the butter and both sugars on high speed until light and fluffy, approximately 5 minutes. Lower the speed to medium, add the eggs one at a time, then add the vanilla and mix well.
In a separate bowl, whisk together the buttermilk, sour cream, and coffee.
In another bowl, sift together the flour, cocoa powder, baking soda, and salt.
On low speed, add the buttermilk mixture and the flour mixture alternately in thirds, beginning with the buttermilk mixture and ending with the flour mixture. Mix only until blended. Fold the batter with a rubber spatula to be sure it’s completely blended. Divide the batter between the cupcake pans (I use one rounded 2 1/4-inch ice cream scoop per cupcake).
Bake on the middle rack of the oven for 20 to 25 minutes, or until a toothpick comes out clean. Cool for 10 minutes, remove from the pans, allow to cool completely before frosting.
COCONUT FROSTING: Combine milk, sugar, eggs, butter and vanilla in a saucepan. Cook and stir over medium heat until thickened, about 12 minutes. Remove from heat and add coconut and pecans. Cool, stirring occasionally, until spreading consistency.