Follow up to 3c24fb656f3b3370b7152d6f1d2cc9dbc6fbae5d
Moved 'count' declaration in order to fit MSVC c89-c99 standard