Fix term counters in script field terms facet

Fixes #2878