Does something like this do the job?
text = "xxx@1234 abcd xxx@2345 xxx@3456 xxx@3456 xxx@3456 xxx@1234 @xyz" //
StringSplit;
text // InputForm
{"xxx@1234", "abcd", "xxx@2345", "xxx@3456", "xxx@3456", "xxx@3456", "xxx@1234", "@xyz"}
codes = StringCases[text, ___ ~~ "@" ~~ code__ -> code] // Flatten
{"1234", "2345", "3456", "3456", "3456", "1234", "xyz"}
Counts[codes]
<|"1234" -> 2, "2345" -> 1, "3456" -> 3, "xyz" -> 1|>
All the best,
Ian