How is an adverb, modifying the adjective "many." "Cats" is the (bare) subject. The phrase "how many cats" is a noun phrase, so if you divide the sentence into 3 parts - subject / verb / object - then that whole noun phrase is considered to be the subject part of the sentence. Noun phrases can be very long with adverbs, adjectives, phrases, etc.
Running swiftly on soft paws, the exquisitely beautiful and dainty long-haired calico cats chased the mice.
In "B", "mice" is the subject, and "cats" is the object.
EDIT: Here is the dictionary definition of "subject": Grammar. (in English and many other languages) a syntactic unit that functions as one of the two main constituents of a simple sentence, the other being the predicate, and that consists of a noun, noun phrase, or noun substitute which often refers to the one performing the action or being in the state expressed by the predicate, as He in He gave notice.