It's because you are dividing by zero. You are doing this because when the list is empty, this results in count being zero.
It's because you are dividing by zero. You are doing this because when the list is empty, this results in count being zero.