Quantification of plasmon excitations in core-level photoemission