Preheat the oven to 350 degrees F. Line cupcake pans with paper liners.
In the bowl of an electric mixer fitted with a paddle attachment, cream the butter and 2 sugars on high speed until light and fluffy, approximately 5 minutes. Lower the speed to medium, add the eggs 1 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, baking soda, and salt. On low speed, add the buttermilk mixture and the flour mixture alternately in thirds to the mixer bowl, 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 among the cupcake pans (1 rounded standard ice cream scoop per cup is the right amount). Bake in the middle of the oven for 20 to 25 minutes, until a toothpick comes out clean. Cool for 10 minutes, remove from the pans, and allow to cool completely before frosting.
Frost each cupcake with Peanut Butter Icing and sprinkle with chopped peanuts, if desired.
Peanut Butter Icing:
Place the confectioners’ sugar, peanut butter, butter, vanilla, and salt in the bowl of an electric mixer fitted with a paddle attachment. Mix on medium-low speed until creamy, scraping down the bowl with a rubber spatula as you work. Add the cream and beat on high speed until the mixture is light and smooth.