Coins Code for counting the number of distributions using an integer lattice problem Code designed for R