Make sure that count is available before trying to use it
Merge pull request #1017 from control-center/feature/CC-134

Make sure that count is available before trying to use it