score:1
These apparently cover a wide range of time-periods, since it seems that Madison was paranoid about many of his correspondence's being discovered. The Library of Congress details some of them.
Most of the early ciphers that Madison used were keyword polyalphabetic code systems involving a complex interaction of a keyword with alphabets and numbers in a preestablished pattern. The codes were designed by James Lovell, a Massachusetts delegate to the Continental Congress and an expert on ciphers.
Basically from looking at letters on the Library of Congress some seem to just be codes, but it also references some letters that were basically lists of numbers.
There is a good example of how the letters were written on the Monticello web site, although these ciphers were used for others than just Madison. It seems writing letters this way was more common than you might think for the time.