There's not much of a reason why count() needs a guarantee that noone else will have a mutable view of the arguments.
http://www.dsource.org/projects/phobos/changeset/1844
Fixed in SVN, thanks to Lars Tandle Kyllingstad.