I don't know of a Calibre plugin that will LOG the counts of a REGEX term into the Library (DB)
Sigil's editor can give you a count of
founds for the current search (scope) before you pull the trigger (and shoot yourself in the foot

)
(I thought Calibre's Edit had that feature, but I could not find it. Neither can LOG the result)