His hat-trick against Valencia has not only made him reach his 500th goal during his professional career, but he's now beaten it. After his third goal, it's now given him a grand total of 501 goals.
436 of those were scored during his time with Barcelona, 49 whilst playing for Argentina, 14 for Argentina's U20 and another 2 were scored whilst he played for Argentina's U23.
At this rate Messi will be reaching 600 goals in no time.