As far as I know, it doesn't count. But, I looked it up. Apparently, it is allowed in USCF but not FIDE.