Count and Any query wrapper