fix count compatibility with oracle