queryCount function

Query download count.