Q: How many 6 digit numbers are there whose digits sum to 51?

A: 56.

There are 3 possible sets of 6 numbers: 999996 where the 6 can be the 1st, 2nd, 3rd, 4th, 5th, 6th place values making 6 6 digit numbers

3 9s and 3 8s which is the same probability as 3 boys and 3 girls with 6 children 3C6 = 20 6 digit numbers

and 4 9s with an 8 and a 7 with 30 possibilities

789999

798999

799899

799989

799998

879999

897999

899799

899979

899997

978999

979899

979989

979998

987999

989799

989979

989997

997899

997989

997998

998799

998979

998997

999789

999798

999879

999897

999978

999987

credit to Julia Robinson Mathematics Festival