That number above has been debunked. If you go all the way back to when Messi made his 1st team debut in Nov. 2003, it breaks down like this in competitive matches.
Barcelona:
22 wins- 17 La Liga wins
- 2 Copa del Rey wins
- 2 Spanish Super Cup wins
- 1 Champion's League win
Draw:
11 draws- 6 La Liga draws
- 3 Copa del Rey draws
- 1 Spanish Super Cup draw
- 1 Champion's League draw
Real Madrid:
15 wins- 9 La Liga wins
- 3 Copa del Rey wins
- 3 Spanish Super Cup wins
- 0 Champion's League wins
I know Messi hasn't been played in all of those matches, but he still has 26 goals (6 from the penalty spot).