finished generating automatic code for DoubleCount