I do BJJ, NOT Hapkido or other martial arts that teach wrist locks. Sometimes when I am rolling, my opponent will grab a single wrist lock, not because they are trying to submit me or anything, but just because they grant control to the person who applies them. The kind that I usually get stuck in is where they grab halfway on my hand, halfway on my wrist and sort of twist it. Anyone who has had this wrist lock applied to them should know that it is fairly uncomfortable and strictly limits mobility. Because this is for rolling, what are some counters that won't injure them. That doesn't mean that it can't be uncomfortable, I just wan't something other than punching them in the face or anything of the striking nature. Is there any kind of BJJ specific counter (Such as an armbar, triangle etc.)? What about a throw if I am standing up?
Assuming you have a free hand you can create some leverage by counter-gripping your opponent's forearm and twisting from your shoulder/core to pressure the lock and hopefully release it.
How you do that, is going to depend on the angle of the lock, but it might involve reaching far-side of the lock & getting a grip, then using your shoulder/torso leverage to break the locking grip.
Of course there's all sorts of things you can do if you can thread a leg into the knot/lock to pry it apart.
Grab their wrist and cause leverage to pry it apart. & if you're on the ground don't forget you can use your feet too.
& when breaking a grip that there's a good grip on either side of the palm-heel of the hand where you can twist outward with leverage through the wrist into the forearm that can be applied slowly rather than forcibly to break the grip & levering your forearms together (using one to fulcrum the other) can be a great tool when grip-breaking. If you can get the base of your thumb into the palm and fingers wrapped around either side of the tarsals you've got the grip
From my 5 years of experience in BJJ, I learn that to avoid wrist locks is a matter of experience and reflex well developed.
About the counter is not so simple, in most of the situations in order of your opponent catches you in a wristlock, you must commit a mistake, give him some opportunity. I think very difficult to counterattack from a disadvantage position, especially if this situation is a mão de vaca since it hurts a lot ...
So my advice is, develop your roll reflexes in order to avoid putting your self in a favorable position to your opponent to apply you a mão de vaca.
Example. I like to apply wristlock from the side mount position, works like that: the most common reaction of the dude who is receiving the side mount position is to do a hip escape putting one hand in my hip and the other hand inmy chest. That hand in my chest is asking me for a wristlock. So you must educate your self to when doing a hip escape do not put your hand in your opponent's chest.