We study a local multiplicity problem related to so-called generalized Shalika models. By establishing a local trace formula for these kind of models, we are able to prove a multiplicity formula for discrete series. As a result, we can show that these multiplicities are constant over every discrete Vogan L-packet and are related to local exterior square L-functions.