  We devise an algorithm which allows one to count the number of Killing
vectors for a Lorentzian manifold of dimension 3. Our algorithm relies on the
principal traces of powers of the Ricci tensor and branches intricately
according to the values of differential invariants arising from the
compatibility conditions of the Killing equation. As illustrating examples, we
classify the Lifshitz and pp-wave spacetimes into a hierarchy based on their
level of symmetry. A complete classification of spacetimes admitting 4 Killing
vectors is also presented.
