Fitting number of synaptic states