Depending on how your table is stored (this should work directly if it is the result of table, but could need some tweaking if it is a data frame or other structure), but it could be as simple as:
newtable <- addmargins(mytable, 1, FUN = function(x) sum( x > 0 ) )