Fixed a bug with ZCOUNT