Fix for bug with collection count method invocation.