The number is what's called the thread slot. Different animations can be called on different slots without cancelling each other out, but if you play two on the same slot, the second one you call overwrites the first.
As for how to make a weapon have a sequence, that I don't really know. You could look at a gun with reloading and try to figure it out, but beyond that I can't help.