Wow. Everything I'd heard today pointed to them staying in the EU. As of now the leave votes are winning. This will probably be one of the big political experiments in my lifetime.
If votes were being counted in a completely random order then 1m votes would have been more than enough to determine the result with very high accuracy.
Regional variations are the only reason things haven't been decided yet.
From what I saw, it'll be morning before the vote is certified. It looks like only 9 of 380ish voting districts/constituencies/etc. (sorry, I'm not British and don't know what they actually call them).