Have not seen this thread till today. Here is a sample AIX job - also works in the cloud to accomplish the task. (Sample FC, Document Pool, keyword name = catchword is used as an example)
Make sure you create a numeric indexfield (let's say named 'NumberofKeywords'). Create a scheduled AIX job on sample FC, with the MAtchData tab configured as follows:use extermnal database, use GUID_autoindex dataabse connection - following SQL statement :
"select dwdocid, count(*) as NumberofEntries from document_catchword group by dwdocid"
On Assign Data tab select
Field NumberofKeywords=Field, NumberOfEntries
Schedule the job to run as often as you need.
If you have AutoIndex module and on-premise system, same method can be used, just use Content database connection for external database