As long as you have the right kind of water for the neons, you could probably get anywhere from 6 to 10 of them and be fine.
Wills, the inch per gallon guidance was first used when the only kinds of fish in shops were things like guppies, platies, mollies, neons, zebras and similar small fish. It works fairly well for them but not for large fish. It is a very conservative stocking level for tiny fish like neons and Heterandria formosa but still works OK for something the size of a swordtail. Anything bigger than a molly or swordtail means rethinking how many will really work well.