We can't know for certain (at least not from that article), but there is some evidence that at least a few exceptional birds can pass the mirror test, and Alex certainly appears to have been an exceptional bird. It's plausible that he understood it was his own image.