The 1" of fish per gallon is not a good way to judge. Do some research on the fish you want to keep and find out their requirements. Good morning and welcome to the forum!
I think it can be a useful rule of thumb, as long as you remember that it only applies to slim bodied, tropical fish that grow to less than three inches, adult size.