On the first floor: 22 hieroglyph pillars (but I guess a couple walls say the same thing, so there are actually 19 messages)
On the second floor: 8 hieroglyph pillars (8 messages)
On the third floor: 5 hieroglyph pillars (5 messages)
On the fourth floor: 5 hieroglyph pillars (5 messages)
In total: 40 hieroglyph pillars and 37 messages
Source: Bulbapedia