According to the highly respected WORMATLAS: A Database of Behavioral and Structural Anatomy of Caenorhabditis elegans, the number is invariable in this animal, one of the most studied in the world.
There are 302 neurons in the nervous system of C. elegans; this number is invariant between animals. Each neuron has a unique combination of properties, such as morphology, connectivity and position, so that every neuron may be given a unique label. Groups of neurons that differ from each other only in position have been assigned to classes. There are 118 classes that have been made using these criteria, the class sizes ranging from 1 to 13. Thus C. elegans has a rich variety of neuron types in spite of having only a small total complement of neurons. (Emphasis mine)
From the above, you might guess that the number of synapses are not, however.
The full list of synapses for hermaphrodite (including larval stages) and adult male are currently being reviewed and revised for the Wormwiring Project. All data comes from re/analysis of the sections for the hermaphrodite N2U, N2T, N2W and JSE animals, and male N2Y and n930 animals. The total counts of both electrical and chemical synapses are likely to be substantially higher than what was reported in the Mind of a Worm.
Would I be surprised if someone found a different number in a particular specimen? No more so than when people are born with four kidneys, a parasitized twin, etc.