# Perl, 65 bytes map{map{$b^=2*y,/\\L,,;$a+=y,/\\V,,+$b*y,_ L,,}split//}<>;print$a - Toggle $b between 0 and 2 upon seeing / \ or L. - Add 1 to $a upon seeing / \ or V. - Add $b to $a upon seeing _ space or L.