You do not need the INDIRECT function in your formula.
All you need to do is use
(where D4 holds AMT or is a cell using a Data Validation dropdown list)
I suggest that you build the "count" in a second sheet of the Google Forms Response Spreadsheet, and then reference it using importrange.
Suppose that your Google Forms Response Sheet looks like this:
Create a new sheet in the same spreadsheet, say the sheet name = "Count".
Put a header in Cell A1,
Insert this formula in cell A2:
Do the following:
Make a copy of tab Feuille 1
The rest of the steps are all in this copied tab.
In cell A3 place the formula
In cell A14 place:
Manually fill in the values for cells A8, ...
The problem is that Col5 has numbers but you are comparing it to a text value. Instead of Col5='14' use Col5=14
=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1er6drwogbR3-MAAYrtz96V1i_Cs0jTngcGYUeZ10rmA/edit#gid=1418684261", "A:Z"), "SELECT Col4 where Col5=14")
Basically there are two mistakes in your query formula.
IMPORTRANGE("Sheet1","QC sheet!A792:B10000") can not return anything. The reason being that you need to replace the Sheet part of the formula with the sheet's ID that you want to import from.
(More info about IMPORTRANGE)
You mention Col4 when you import just 2 columns A and B from sheet!A792:...
You can use the entire url:
But just the spreadsheet id should also work:
More generally the google sheets url is structured like this:
If you want to 'skip a column', you can use regexreplace on one column of your range; so it will have the same number of rows.
You would not be able to edit the column afterward obviously, but you can utilize some code in the final input for regexreplace function to drop-in what you need.