When I have no reason to do otherwise, I always fall back on this simple routine that works like magic. I never get a fake number and the ice is broken before it can form.
"Here put my number in your phone. It's 555-1234... Ok now call it so I have yours."
(wait for her to do so.)
The first text
After the close, you can either stay around for a bit or leave or whatever it is that you do. doesn't matter. When you do part ways, say this to her instead of a simple "see ya later".
"Now I want you to text me when you get home so I know you got there safely"
Of course if you drunkenly forget to say the magic words you can always open with "Hey <playful nickname> did you get home safe?"
Why it works
The close is awesome because it uses the foot-in-the-door rule that any good salesman will use. Start with something small and hard to argue with. Most girls will take your number even if they won't give theirs just because they don't HAVE TO do anything with it and it's easier to accept it than to reject a guy and come up with a BS excuse. After they do take it though they are in a different frame of mind and are more likely to give out their number. They have subconsciously committed to you even just a tiny bit... it also eliminates 99% of the excuses they would normally give when rejecting you. So it's just plain awkward to refuse to call you when you are standing right there.
I actually learned this from a girl who did it to me once, but I've seen it here and there in various pua material.
The magic words to get a first text work because they make me come off as dominant and caring or maybe even protective. That's kinda my schtick so it might not be best for everyone but for me it's congruent.
I tell them when to text and what to say. This will break the ice and put the girl in a position of chasing your attention rather than the other way around.
I can't even think of a time when it failed to get a text.