Find the number of different products that are produced by companies at different headquarter cities.
return headquarter cities ;return companies of #1 ;return the  products produced by #2 ;return the  number of  #3
['select', 'project', 'project', 'aggregate']