VA does not require write-in ballots to be counted in a primary. But it does not prohibit it either. (The legal language is somewhat obfuscatory.)
It is up to each state party to decide whether or not to count write-in votes.
In 2008 the VA Republican Party turned in zero (0) write-in votes to the state.
It is up to the VA GOP to decide whether or not to count write-in votes in 2012. Given that the VA GOP apparatus is dominated by Romney supporters, it would be doubtful I think.
I’m back from a big argument over at HA about whether or not write-in votes in VA primaries are allowed but optional, or are outright prohibited under VA law.
It turns out that there is language at 24.2-529 that trumps 24.2-664. It unequivocally prohibits write-in votes in primaries.
I stand corrected.