Fixed #549 - Enhanced TypedQueryBuilder to also output COUNT(*) queries