title: Count occurrences of value in a set of variables in R (per row)
body: <p>Let's say I have a data frame with 10 numeric variables V1-V10 (columns) and multiple rows (cases).</p>
  
  <p>What I would like R to do is: For each case, give me the number of occurrences of a certain value in a set of variables.</p>
  
  <p>For example the number of occurrences of the numeric value 99 in that single row for V2, V3, V6, which obviously has a minimum of 0 (none of the three have the value 99) and a maximum of 3 (all of the three have the value 99).</p>
  
  <p>I am really looking for an equivalent to <a href="http://pic.dhe.ibm.com/infocenter/spssstat/v20r0m0/index.jsp?topic=/com.ibm.spss.statistics.help/syn_count_overview.htm" rel="noreferrer">the SPSS function <code>COUNT</code></a>: "COUNT <strong>creates a numeric variable that, for each case, counts the occurrences of the same value (or list of values) across a list of variables.</strong>"</p>
  
  <p>I thought about <code>table()</code> and library plyr's <code>count()</code>, but I cannot really figure it out. Vectorized computation preferred. Thanks a lot!</p>