title: How to count value across multiple columns in pandas?
body: <p>I have a pandas DataFrame relative to motorcycle.
  The dataset has 1000 rows and 30 columns.</p>
  
  <p>For example,</p>
  
  <pre><code>date motor1 motor2 motor3 vehicle1  vehicle2 reason 
  2010 Honda   NaN    NaN    Sedan     NaN        *    
    :
  2012 Yamaha  Kymco  NaN    Truck     Sedan      *  
    :
  2013 Harley  Kymco  Kymco  Ambulance NaN        *     
    :
  </code></pre>
  
  <p>I want to create a new column in order to record the value across columns without null value.</p>
  
  <p>The output I expect is:</p>
  
  <pre><code>year motor1 motor2 motor3 vehicle1  vehicle2 reason count
  2010 Honda   NaN    NaN    Sedan     NaN        *     2
    :
  2012 Yamaha  Kymco  NaN    Truck     Sedan      *     4
    :
  2013 Harley  Kymco  Kymco  Ambulance  NaN       *     4
    :
  </code></pre>
  
  <p>Additionally, because the data is arranged by year, I also want to set a condition for a specific year and just see how many vehicles and motorcycles involved in that specific year. </p>
  
  <p>Initially, I want to use <code>groupby</code> function + <code>count</code> function +<code>conditional</code> function, but I cannot get what I want.</p>
  
  <p>Is there any elegant way to solve the problem?</p>