Sort of. In natural english, both forms are awkward, and spoken aloud would gather a few eyebrow raises.
Grammatically speaking, "the largest number" is the subject of the sentence, and "of cows" is an adjectival clause, therefore, the adverb ("is") remains singular.
However, even though this is grammatically correct, it would not be natural for a native speaker.
Using "The largest number" is an issue. Depending on what you're going for, "a swarm of" would work; if it's colloquial, "an insane amount"; or if it's formal, "a huge number".
Below is a list of alternatives, with their score in terms of natural English in brackets.
• A huge number of cows is running for the hills (5/10)
• A swarm of cows is running for the hills (9/10)
• Cows are running for the hills in massive numbers (7/10)
• Cows are running for the hills in staggering amounts (8/10)
Some of the wording is switched around so the intended message may not get across in some of them. Hopefully one will work; otherwise your sentence may sound quite jarring.