got num results query working