Your ideas for this tank sound pretty good. I wanted to do the same thing in my 20 long. Ended up going with 11 cardinals, 4 panda corys, 2 habrosus cories, 2 sparkling gouramis, and a few cpds my brother had no place for when he moved. :/
For you it really depends on the ratio of fish you want to eachother. Do you want more cardinals or more cories? As for the rams, I'd say you would want to max out at either a pair or 3. Pair would be better, but I've seen 3 in a 20 done before. As for cories it also depends what kind you get. You could fit a bunch of habrosus, hastatus, or pygmaeus in there, but youd be more limited with stocking on the bigger species (obviously)