Q:

What does 10 mean in libgmp10 library?

My system has libgmp.so.10.2.0 while official source says current version is 6.1.2.
Is this specific to GMP? Would having libgmp.so.42.0.0 be OK?
Debian adds another number "2" to the mix (ignoring patches).
libgmp10:amd64  2:6.0.0+dfsg-6

A:

You're referring to the libtool version, which is usually unrelated to the library's release version. 
A quick look at the sources would show you that the versions are set in Makefile.am, with a comment-block preceding the values giving a summary of the history.
Here's a chunk where you'll see the numbers of the Debian package (version info for libmp is in the last column):
#       release   libgmp  libgmpxx libmp 
...
#        5.0.1   10:1:0    6:1:2   4:21:1 
#        5.0.2   10:2:0    6:2:2   4:22:1 
#        5.0.3   10:3:0    6:3:2   4:23:1 
#        5.0.4   10:4:0    6:4:2   4:24:1 
#        5.0.5   10:5:0    6:5:2   4:25:1 
#        5.1.0   11:0:1    7:0:3     - 

and (current)
#        6.1.2   13:2:3    9:2:5     - 

and
# We interpret "implementation changed" in item "1." above as meaning any 
# release, ie. the REVISION is incremented every time (if nothing else). 
# Even if we thought the code generated will be identical on all systems, 
# it's still good to get the shared library filename (like 
# libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from. 

LIBGMP_LT_CURRENT    = 13
LIBGMP_LT_REVISION   = 2
LIBGMP_LT_AGE        = 3

LIBGMPXX_LT_CURRENT  = 9
LIBGMPXX_LT_REVISION = 2
LIBGMPXX_LT_AGE      = 5

