I try to prove that in MSO we can't define equality of two cardinalities of structure. For example number of nodes in two graphs can't be expressed.
My only tool to do this is theorem:
Language is regular iff it can be defined in MSO
So look please at my trial and try to check it:
We know that language of words such that number of symbol $a$ is equal to number of symbol $b$ is irregular. We get arbitrary word and construct two graphs - both without edges - only requirement is that number of $a$ is number of nodes and number of $b$ is equal to number in second graph.
Then we assume that there exists formula stated in content of task and we are able to define irregular language. Contradiction.
I know that it is not formal, but I can't do it better.
Edit
After suggestion answerer:
$$\phi(X,Y) \leftrightarrow|X|=|Y|$$
$$\exists_X\exists_Y[\phi(X,Y) \wedge (\forall_x (P_a(x)\to x\in X)) \wedge (\forall_x (P_b(y)\to y\in Y)\wedge (\forall_x (x\in X \vee x\in Y))] $$
$P_a(x)$ means that at position $x$ there is a symbol $a$.
I managed (I believe) define language with equal number of symbol $a$ and symbol $b$.