he's just trying to see if you are still into him. It caresses his ego.
to be honest, girls do the same thing only discretely. But this things he does is a way to see what's in store for him. Maybe he likes to think that the reason for your bit**** attitude is him. Who knows? But if I were you, I would just brush it off. if he text you again don't even bother to answer.
If your ex wants you back, then make him want you instead of you acting all ga-ga over the relationship (not that you are, anyway). But you know what, you deserve someone better. Someone once told me that a guy will treat you the way you let him.