Patch submitted (#6158)

I’ve submitted a patch for ticket #6158.

Count should always return an integer. On decimal columns, the value was being type cast to match the column type. This makes sense for sum() and average() operations, but not for count() operations.