Added a fix to implementation of ticket #364
The "cnt()" function was not working properly
Authored by: numere 2018-08-22
Parent: [r380]
Child: [r382]