Anomalous Hall Effect and Skyrmion Number in Real and Momentum Spaces