The anusvara is one of two marks Brahmi has that stand outside the letters proper, the other being the visarga. It is a dot, written above the line, and it says that a nasal is present without saying which one, leaving the following consonant to determine that. Before a stop of any of the five classes the nasal is the one made at the same place, so a reader who knows the rule reads the correct nasal without needing it written; at the end of a word before a pause the value is the labial nasal.
That is an economical solution to a real problem, and it explains why the five class nasals are written far less often than their place in the order suggests. It also means the alphabet has to decide what to do with the two marks when it counts itself, which is the source of the varying totals given for the Sanskrit alphabet in different books. Counted with the anusvara and the visarga among the vowels there are sixteen vowels; counted without them, fourteen.
Every script descended from Brahmi inherited both marks, and the traditional figure of fifty letters for the Sanskrit alphabet depends on a particular set of choices about them. A reader meeting two different counts of the same alphabet has found a boundary dispute about what a letter is, not an error.