Added support for distinct count