title: How to 'count' only when header matches value?
body: <p>I have a Google Form that collects a bunch of data from dropdown questions on a Sheet with each question going to one column (as normal). On separate sheets, I want to be able to count how many times each option is selected.
  Here is an example of what the response sheet might look like. A, B, and C are all questions.</p>
  <p><a href="https://i.stack.imgur.com/3d6fS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3d6fS.png" alt="Input Sample" /></a></p>
  <p>I would then have separate sheets for 'Person?', 'Place?', and 'Thing?'. The 'Person?' sheet would look something like this:</p>
  <p><a href="https://i.stack.imgur.com/YUOI5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YUOI5.png" alt="Person sheet" /></a></p>
  <p>I want to be able to add in the count of each time the option appears for <em>that question</em>. In the example, notice that 'Napoleon&quot; is in both Col A and Col C. If I just count the number of times 'Napoleon' appears, I will get '2' even though he only appears once in the &quot;Person?&quot; responses.</p>
  <p>I originally used a QUERY function like <code>=QUERY('Input Data'!1:1000, &quot;select count(A) where A contains '&quot;&amp;$A2&amp;&quot;'&quot;,0)</code>. BUT, I need it to be dynamic. So the &quot;Person?&quot; question may not always be Col A. I want the Query (or whatever formula) to search the headers and only return the count of that option for that question even if the column location changes.</p>