LPS-31462 Counting entities in invocation handler