Added post-increment for $count

It has been added the missing post-increment for variable $count.
Merge pull request #2768 from porquero/patch-1

Added post-increment for $count