Fix `count` method return value.
Return number represented as integer instead of string.
Add space between type-casting operator and return value.
Merge pull request #4069 from Andreyco/4.1

Fix `count` method return value. #4.1