maximum cardinality weighted matching
If you take $S$ to be the sum of all the weights on all the edges in the graph and you add $S$ to all the weights in the graph, then a regular maximum weight matching will find you the matching you are looking for, since now with the large weights on all the edges, it will prefer a matching that uses the most number of edges first.
In your example of 1--2--3--4 with weights 1, 10, 1, here we have $S=12$, so add 12 to all the edges to have edge weights of 13, 22, 13 and now a regular max weight matching would prefer 13+13 over 22.
I'm not sure if it is easy to prove that $S$ is quite big enough, but it should be easy to prove that $mS$ is big enough to all to all edges (that is, sum of all edges times the number of edges).