The only row vector vs. column vector issues I see here (I ran the code) is between "rpm" and "count".
rpm is defined to be a column vector with this:
and remains a column vector throughout all your computations.
count in indirectly defined to be a row vector - indirectly because you never initialize it with anything but this:
When you introduce a variable like this MATLAB automatically creates it as a row vector with exactly as many elements as it needs. The first line creates a 1 x 1 row vector, the second stretches it out to a 1 x 1000 element row vector with zeros in positions 2,...,999