Count out rules

> Just curious, are there any "official" rules as to how count outs are supposed to work? Sometimes one person rolling back in stops the count, sometimes one person rolls in and they continue the count on whoever is still outside. And on Raw last night, Sin Cara crawled back in, but Braun pulled him back out and the count continued (so that when Braun rolled back in Sin Cara only had a "2 count" left). I think that may have been the most blatant "wrong" count I’ve ever seen, where Sin Cara had technically only been out of the ring for 2 seconds before losing.
> I know the real answer to my question is "it’s scripted, and they write it how it’s the most convenient for the match", but the inconsistency annoys me. So is there any "official" way it’s supposed to work, or has it always been all over the place like this?
> Thanks!
> -Robby

I would have to consult 1998 Chris Jericho and get a ruling from the Library of Congress.

On the subject of countout, where did the thing that NXT crowds do come from? Where they count one ahead of the ref. Because it’s f------ stupid.