You can specify additional event types which trigger a count.

The additionalEvents option is a string that specifies additional event
types which should trigger a count.

For example, this can be used in conjunction with the autocomplete
plug-in to ensure that the count is updated when an item is chosen from
the menu.