CSPACE-5939: Added option to limit number of queries extracted.