The first paragraph of https://www.cfo.com/accounting-tax/2007/10/finance-in-histor... explains:
“Bean counting” has long been an insulting term for what finance professionals and accountants do. Often it’s been used to tar CFOs as transaction processors — a role largely relegated to the back office. What’s more, people like to use the phrase to ratchet up the pedestrian aspects of finance by tagging practitioners as “mere” bean counters or “little more than” bean counters or “simply” bean counters. Such clichés get tossed around a lot.
Per https://www.phrases.org.uk/meanings/bean-counter.html , "A disparaging term for an accountant, or anyone excessively concerned with statistical records or accounts."