in magic is it legal for counterspell to counter another counterspell
yes of course. a counterspell is a spell, whist on the stack, so another counterspell can target it.