title: Counting number of occurrences in a time series for a set of condition(s)
body: <p><img src="https://i.stack.imgur.com/VM0OA.png" alt="indicator time series - pivoted table"></p>
  
  <p>I am required to do some summary statistics on the attached table as an example.
  Some of the questions to answer include:</p>
  
  <p>1) How many countries with valid time series (countries that have at least one value/number for a given indicator name over the time period of 2010-2015)
  e.g: Count how many countries have valid times series for the indicator: "Number of completed applications"</p>
  
  <p>2) For a given country and indicator what is the number of year(s) with valid time series.
  e.g: For the indicator number of completed applications and the country Canada? (Answer: 2 --> 2014, 2015) </p>
  
  <p><img src="https://i.stack.imgur.com/TfZyF.png" alt="indicator time series - flat table"></p>
  
  <p>Alternatively, if the table look like this instead (which is a typical csv format) what approach could be taken to answer the two summary statistics questions above?</p>
  
  <p>I have tried method of sumproduct formula for the pivoted table. Is there a better way than this method?</p>
  
  <blockquote>
    <p>=SUMPRODUCT(N((B2:B14>0)+(C2:C14>0)+(D2:D14>0)+(E2:E14>0)+(F2:F14>0)+(G2:G14>0)+(H2:H14>0)+(I2:I14>0)+(J2:J14>0)>0))</p>
  </blockquote>
  
  <p>But what about when it is a flat table? </p>