Fix bug with collection count