Since you are planning on passing through Chinese customs you will have to declare whatever you are carrying (including cash) in accordance with Chinese law.
Declaring it does not necessarily mean that you are not allowed to take it, it just means they want to know about it (and if you fail to declare it, you might forfeit it, or worse). This, apparently official, site says:
RMB20,000 cash or above, or any other foreign currencies in cash equivalent to US$5,000 or above. Items will be dealt with according to the current regulations.
Passengers carrying foreign currencies in cash worth more than US$5,000 and intending to take the currencies out of China in the future shall fill out two declaration forms. After being endorsed by the Customs, one copy of the declaration forms will be returned to the passengers for future use at the time when leaving China.