ICS writer: fix channel count correction (rebased onto develop)



This is the same as gh-385 but rebased onto develop.

----

http://hudson.openmicroscopy.org.uk/view/Bio-Formats/job/BIOFORMATS-writers-stable should pass as a result of this PR.  It's probably also worth testing that this works in Fiji/ImageJ.