Added execution of count query.